generated
This commit is contained in:
@@ -397,6 +397,17 @@ staging/src/k8s.io/kube-aggregator/pkg/client/informers/internalversion/apiregis
|
|||||||
staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/internalversion
|
staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/internalversion
|
||||||
staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1
|
staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1
|
||||||
staging/src/k8s.io/kube-aggregator/pkg/controllers
|
staging/src/k8s.io/kube-aggregator/pkg/controllers
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/validation
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions/v1alpha1
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions/internalversion
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/internalversion
|
||||||
|
staging/src/k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/v1alpha1
|
||||||
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/install
|
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/install
|
||||||
staging/src/k8s.io/metrics/pkg/apis/metrics/install
|
staging/src/k8s.io/metrics/pkg/apis/metrics/install
|
||||||
staging/src/k8s.io/sample-apiserver
|
staging/src/k8s.io/sample-apiserver
|
||||||
|
26
staging/src/k8s.io/kube-apiextensions-server/BUILD
Normal file
26
staging/src/k8s.io/kube-apiextensions-server/BUILD
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_binary",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_binary(
|
||||||
|
name = "kube-apiextensions-server",
|
||||||
|
library = ":go_default_library",
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["main.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/cmd/server:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
394
staging/src/k8s.io/kube-apiextensions-server/Godeps/Godeps.json
generated
Normal file
394
staging/src/k8s.io/kube-apiextensions-server/Godeps/Godeps.json
generated
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kube-apiextensions-server",
|
||||||
|
"GoVersion": "go1.8",
|
||||||
|
"GodepVersion": "v79",
|
||||||
|
"Packages": [
|
||||||
|
"./..."
|
||||||
|
],
|
||||||
|
"Deps": [
|
||||||
|
{
|
||||||
|
"ImportPath": "bitbucket.org/ww/goautoneg",
|
||||||
|
"Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/PuerkitoBio/purell",
|
||||||
|
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/PuerkitoBio/urlesc",
|
||||||
|
"Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/beorn7/perks/quantile",
|
||||||
|
"Rev": "3ac7bf7a47d159a033b107610db8a1b6575507a4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/auth/authpb",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/client",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/clientv3",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/etcdserver/etcdserverpb",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/mvcc/mvccpb",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/pkg/fileutil",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/pkg/pathutil",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/pkg/tlsutil",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/pkg/transport",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/etcd/pkg/types",
|
||||||
|
"Rev": "20490caaf0dcd96bb4a95e40625559def8ef5b04"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/go-systemd/daemon",
|
||||||
|
"Rev": "48702e0da86bd25e76cfef347e2adeb434a0d0a6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/go-systemd/journal",
|
||||||
|
"Rev": "48702e0da86bd25e76cfef347e2adeb434a0d0a6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/coreos/pkg/capnslog",
|
||||||
|
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/davecgh/go-spew/spew",
|
||||||
|
"Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/docker/distribution/digest",
|
||||||
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/docker/distribution/reference",
|
||||||
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/elazarl/go-bindata-assetfs",
|
||||||
|
"Rev": "3dcc96556217539f50599357fb481ac0dc7439b9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful",
|
||||||
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful/log",
|
||||||
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful/swagger",
|
||||||
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/evanphx/json-patch",
|
||||||
|
"Rev": "ba18e35c5c1b36ef6334cad706eb681153d2d379"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/ghodss/yaml",
|
||||||
|
"Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/analysis",
|
||||||
|
"Rev": "b44dc874b601d9e4e2f6e19140e794ba24bead3b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/jsonpointer",
|
||||||
|
"Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/jsonreference",
|
||||||
|
"Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/loads",
|
||||||
|
"Rev": "18441dfa706d924a39a030ee2c3b1d8d81917b38"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
|
"Rev": "6aced65f8501fe1217321abf0749d354824ba2ff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/go-openapi/swag",
|
||||||
|
"Rev": "1d0bd113de87027671077d3c71eb3ac5d7dbba72"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||||
|
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
||||||
|
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/glog",
|
||||||
|
"Rev": "44145f04b68cf362d9c4df2182967c2275eaefed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/groupcache/lru",
|
||||||
|
"Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/protobuf/jsonpb",
|
||||||
|
"Rev": "4bd1920723d7b7c925de087aa32e2187708897f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/protobuf/proto",
|
||||||
|
"Rev": "4bd1920723d7b7c925de087aa32e2187708897f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/google/gofuzz",
|
||||||
|
"Rev": "44d81051d367757e1c7c6a5a86423ece9afcf63c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/grpc-ecosystem/go-grpc-prometheus",
|
||||||
|
"Rev": "2500245aa6110c562d17020fb31a2c133d737799"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/grpc-ecosystem/grpc-gateway/runtime",
|
||||||
|
"Rev": "84398b94e188ee336f307779b57b3aa91af7063c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/grpc-ecosystem/grpc-gateway/runtime/internal",
|
||||||
|
"Rev": "84398b94e188ee336f307779b57b3aa91af7063c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/grpc-ecosystem/grpc-gateway/utilities",
|
||||||
|
"Rev": "84398b94e188ee336f307779b57b3aa91af7063c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/howeyc/gopass",
|
||||||
|
"Rev": "3ca23474a7c7203e0a0a070fd33508f6efdb9b3d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/imdario/mergo",
|
||||||
|
"Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/inconshreveable/mousetrap",
|
||||||
|
"Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/juju/ratelimit",
|
||||||
|
"Rev": "77ed1c8a01217656d2080ad51981f6e99adaa177"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/mailru/easyjson/buffer",
|
||||||
|
"Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/mailru/easyjson/jlexer",
|
||||||
|
"Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/mailru/easyjson/jwriter",
|
||||||
|
"Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
|
||||||
|
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/pborman/uuid",
|
||||||
|
"Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/pkg/errors",
|
||||||
|
"Rev": "a22138067af1c4942683050411a841ade67fe1eb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/prometheus/client_golang/prometheus",
|
||||||
|
"Rev": "e51041b3fa41cece0dca035740ba6411905be473"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/prometheus/client_model/go",
|
||||||
|
"Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/prometheus/common/expfmt",
|
||||||
|
"Rev": "ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/prometheus/common/model",
|
||||||
|
"Rev": "ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/prometheus/procfs",
|
||||||
|
"Rev": "454a56f35412459b5e684fd5ec0f9211b94f002a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/spf13/cobra",
|
||||||
|
"Rev": "f62e98d28ab7ad31d707ba837a966378465c7b57"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/spf13/pflag",
|
||||||
|
"Rev": "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/ugorji/go/codec",
|
||||||
|
"Rev": "ded73eae5db7e7a0ef6f55aace87a2873c5d2b74"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/crypto/ssh/terminal",
|
||||||
|
"Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/context",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/html",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/html/atom",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/http2",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/http2/hpack",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/idna",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/internal/timeseries",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/lex/httplex",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/trace",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/websocket",
|
||||||
|
"Rev": "f2499483f923065a842d38eb4c7f1927e6fc6e6d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/sys/unix",
|
||||||
|
"Rev": "8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/cases",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/internal/tag",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/language",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/runes",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/secure/bidirule",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/secure/precis",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/transform",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/unicode/bidi",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/unicode/norm",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/text/width",
|
||||||
|
"Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/codes",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/credentials",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/grpclog",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/internal",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/metadata",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/naming",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/peer",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "google.golang.org/grpc/transport",
|
||||||
|
"Rev": "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/inf.v0",
|
||||||
|
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/natefinch/lumberjack.v2",
|
||||||
|
"Rev": "20b71e5b60d756d3d2f80def009790325acc2b23"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/yaml.v2",
|
||||||
|
"Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@@ -0,0 +1,25 @@
|
|||||||
|
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",
|
||||||
|
"register.go",
|
||||||
|
"types.go",
|
||||||
|
"zz_generated.deepcopy.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,32 @@
|
|||||||
|
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 = ["install_test.go"],
|
||||||
|
library = ":go_default_library",
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = ["//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library"],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["install.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/pkg/api:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,27 @@
|
|||||||
|
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",
|
||||||
|
"register.go",
|
||||||
|
"types.go",
|
||||||
|
"zz_generated.conversion.go",
|
||||||
|
"zz_generated.deepcopy.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,225 @@
|
|||||||
|
// +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"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
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_CustomResource_To_apiextensions_CustomResource,
|
||||||
|
Convert_apiextensions_CustomResource_To_v1alpha1_CustomResource,
|
||||||
|
Convert_v1alpha1_CustomResourceCondition_To_apiextensions_CustomResourceCondition,
|
||||||
|
Convert_apiextensions_CustomResourceCondition_To_v1alpha1_CustomResourceCondition,
|
||||||
|
Convert_v1alpha1_CustomResourceList_To_apiextensions_CustomResourceList,
|
||||||
|
Convert_apiextensions_CustomResourceList_To_v1alpha1_CustomResourceList,
|
||||||
|
Convert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames,
|
||||||
|
Convert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames,
|
||||||
|
Convert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec,
|
||||||
|
Convert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec,
|
||||||
|
Convert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus,
|
||||||
|
Convert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResource_To_apiextensions_CustomResource(in *CustomResource, out *apiextensions.CustomResource, s conversion.Scope) error {
|
||||||
|
out.ObjectMeta = in.ObjectMeta
|
||||||
|
if err := Convert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResource_To_apiextensions_CustomResource is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResource_To_apiextensions_CustomResource(in *CustomResource, out *apiextensions.CustomResource, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResource_To_apiextensions_CustomResource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResource_To_v1alpha1_CustomResource(in *apiextensions.CustomResource, out *CustomResource, s conversion.Scope) error {
|
||||||
|
out.ObjectMeta = in.ObjectMeta
|
||||||
|
if err := Convert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResource_To_v1alpha1_CustomResource is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResource_To_v1alpha1_CustomResource(in *apiextensions.CustomResource, out *CustomResource, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResource_To_v1alpha1_CustomResource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResourceCondition_To_apiextensions_CustomResourceCondition(in *CustomResourceCondition, out *apiextensions.CustomResourceCondition, s conversion.Scope) error {
|
||||||
|
out.Type = apiextensions.CustomResourceConditionType(in.Type)
|
||||||
|
out.Status = apiextensions.ConditionStatus(in.Status)
|
||||||
|
out.LastTransitionTime = in.LastTransitionTime
|
||||||
|
out.Reason = in.Reason
|
||||||
|
out.Message = in.Message
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResourceCondition_To_apiextensions_CustomResourceCondition is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResourceCondition_To_apiextensions_CustomResourceCondition(in *CustomResourceCondition, out *apiextensions.CustomResourceCondition, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResourceCondition_To_apiextensions_CustomResourceCondition(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResourceCondition_To_v1alpha1_CustomResourceCondition(in *apiextensions.CustomResourceCondition, out *CustomResourceCondition, s conversion.Scope) error {
|
||||||
|
out.Type = CustomResourceConditionType(in.Type)
|
||||||
|
out.Status = ConditionStatus(in.Status)
|
||||||
|
out.LastTransitionTime = in.LastTransitionTime
|
||||||
|
out.Reason = in.Reason
|
||||||
|
out.Message = in.Message
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResourceCondition_To_v1alpha1_CustomResourceCondition is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResourceCondition_To_v1alpha1_CustomResourceCondition(in *apiextensions.CustomResourceCondition, out *CustomResourceCondition, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResourceCondition_To_v1alpha1_CustomResourceCondition(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResourceList_To_apiextensions_CustomResourceList(in *CustomResourceList, out *apiextensions.CustomResourceList, s conversion.Scope) error {
|
||||||
|
out.ListMeta = in.ListMeta
|
||||||
|
out.Items = *(*[]apiextensions.CustomResource)(unsafe.Pointer(&in.Items))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResourceList_To_apiextensions_CustomResourceList is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResourceList_To_apiextensions_CustomResourceList(in *CustomResourceList, out *apiextensions.CustomResourceList, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResourceList_To_apiextensions_CustomResourceList(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResourceList_To_v1alpha1_CustomResourceList(in *apiextensions.CustomResourceList, out *CustomResourceList, s conversion.Scope) error {
|
||||||
|
out.ListMeta = in.ListMeta
|
||||||
|
if in.Items == nil {
|
||||||
|
out.Items = make([]CustomResource, 0)
|
||||||
|
} else {
|
||||||
|
out.Items = *(*[]CustomResource)(unsafe.Pointer(&in.Items))
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResourceList_To_v1alpha1_CustomResourceList is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResourceList_To_v1alpha1_CustomResourceList(in *apiextensions.CustomResourceList, out *CustomResourceList, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResourceList_To_v1alpha1_CustomResourceList(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames(in *CustomResourceNames, out *apiextensions.CustomResourceNames, s conversion.Scope) error {
|
||||||
|
out.Plural = in.Plural
|
||||||
|
out.Singular = in.Singular
|
||||||
|
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
|
||||||
|
out.Kind = in.Kind
|
||||||
|
out.ListKind = in.ListKind
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames(in *CustomResourceNames, out *apiextensions.CustomResourceNames, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames(in *apiextensions.CustomResourceNames, out *CustomResourceNames, s conversion.Scope) error {
|
||||||
|
out.Plural = in.Plural
|
||||||
|
out.Singular = in.Singular
|
||||||
|
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
|
||||||
|
out.Kind = in.Kind
|
||||||
|
out.ListKind = in.ListKind
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames(in *apiextensions.CustomResourceNames, out *CustomResourceNames, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec(in *CustomResourceSpec, out *apiextensions.CustomResourceSpec, s conversion.Scope) error {
|
||||||
|
out.Group = in.Group
|
||||||
|
out.Version = in.Version
|
||||||
|
if err := Convert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames(&in.Names, &out.Names, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out.Scope = apiextensions.ResourceScope(in.Scope)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec(in *CustomResourceSpec, out *apiextensions.CustomResourceSpec, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResourceSpec_To_apiextensions_CustomResourceSpec(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec(in *apiextensions.CustomResourceSpec, out *CustomResourceSpec, s conversion.Scope) error {
|
||||||
|
out.Group = in.Group
|
||||||
|
out.Version = in.Version
|
||||||
|
if err := Convert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames(&in.Names, &out.Names, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out.Scope = ResourceScope(in.Scope)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec(in *apiextensions.CustomResourceSpec, out *CustomResourceSpec, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResourceSpec_To_v1alpha1_CustomResourceSpec(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus(in *CustomResourceStatus, out *apiextensions.CustomResourceStatus, s conversion.Scope) error {
|
||||||
|
out.Conditions = *(*[]apiextensions.CustomResourceCondition)(unsafe.Pointer(&in.Conditions))
|
||||||
|
if err := Convert_v1alpha1_CustomResourceNames_To_apiextensions_CustomResourceNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus(in *CustomResourceStatus, out *apiextensions.CustomResourceStatus, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_CustomResourceStatus_To_apiextensions_CustomResourceStatus(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus(in *apiextensions.CustomResourceStatus, out *CustomResourceStatus, s conversion.Scope) error {
|
||||||
|
if in.Conditions == nil {
|
||||||
|
out.Conditions = make([]CustomResourceCondition, 0)
|
||||||
|
} else {
|
||||||
|
out.Conditions = *(*[]CustomResourceCondition)(unsafe.Pointer(&in.Conditions))
|
||||||
|
}
|
||||||
|
if err := Convert_apiextensions_CustomResourceNames_To_v1alpha1_CustomResourceNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus is an autogenerated conversion function.
|
||||||
|
func Convert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus(in *apiextensions.CustomResourceStatus, out *CustomResourceStatus, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiextensions_CustomResourceStatus_To_v1alpha1_CustomResourceStatus(in, out, s)
|
||||||
|
}
|
@@ -0,0 +1,152 @@
|
|||||||
|
// +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 v1alpha1
|
||||||
|
|
||||||
|
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_v1alpha1_CustomResource, InType: reflect.TypeOf(&CustomResource{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CustomResourceCondition, InType: reflect.TypeOf(&CustomResourceCondition{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CustomResourceList, InType: reflect.TypeOf(&CustomResourceList{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CustomResourceNames, InType: reflect.TypeOf(&CustomResourceNames{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CustomResourceSpec, InType: reflect.TypeOf(&CustomResourceSpec{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CustomResourceStatus, InType: reflect.TypeOf(&CustomResourceStatus{})},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResource)
|
||||||
|
out := out.(*CustomResource)
|
||||||
|
*out = *in
|
||||||
|
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.Spec); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Spec = *newVal.(*CustomResourceSpec)
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.Status); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Status = *newVal.(*CustomResourceStatus)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResourceCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceCondition)
|
||||||
|
out := out.(*CustomResourceCondition)
|
||||||
|
*out = *in
|
||||||
|
out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceList)
|
||||||
|
out := out.(*CustomResourceList)
|
||||||
|
*out = *in
|
||||||
|
if in.Items != nil {
|
||||||
|
in, out := &in.Items, &out.Items
|
||||||
|
*out = make([]CustomResource, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
(*out)[i] = *newVal.(*CustomResource)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResourceNames(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceNames)
|
||||||
|
out := out.(*CustomResourceNames)
|
||||||
|
*out = *in
|
||||||
|
if in.ShortNames != nil {
|
||||||
|
in, out := &in.ShortNames, &out.ShortNames
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResourceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceSpec)
|
||||||
|
out := out.(*CustomResourceSpec)
|
||||||
|
*out = *in
|
||||||
|
if newVal, err := c.DeepCopy(&in.Names); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Names = *newVal.(*CustomResourceNames)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1alpha1_CustomResourceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceStatus)
|
||||||
|
out := out.(*CustomResourceStatus)
|
||||||
|
*out = *in
|
||||||
|
if in.Conditions != nil {
|
||||||
|
in, out := &in.Conditions, &out.Conditions
|
||||||
|
*out = make([]CustomResourceCondition, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
(*out)[i] = *newVal.(*CustomResourceCondition)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.AcceptedNames); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.AcceptedNames = *newVal.(*CustomResourceNames)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["validation.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
@@ -0,0 +1,152 @@
|
|||||||
|
// +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 apiextensions
|
||||||
|
|
||||||
|
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_apiextensions_CustomResource, InType: reflect.TypeOf(&CustomResource{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiextensions_CustomResourceCondition, InType: reflect.TypeOf(&CustomResourceCondition{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiextensions_CustomResourceList, InType: reflect.TypeOf(&CustomResourceList{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiextensions_CustomResourceNames, InType: reflect.TypeOf(&CustomResourceNames{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiextensions_CustomResourceSpec, InType: reflect.TypeOf(&CustomResourceSpec{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiextensions_CustomResourceStatus, InType: reflect.TypeOf(&CustomResourceStatus{})},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResource)
|
||||||
|
out := out.(*CustomResource)
|
||||||
|
*out = *in
|
||||||
|
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.Spec); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Spec = *newVal.(*CustomResourceSpec)
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.Status); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Status = *newVal.(*CustomResourceStatus)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResourceCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceCondition)
|
||||||
|
out := out.(*CustomResourceCondition)
|
||||||
|
*out = *in
|
||||||
|
out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceList)
|
||||||
|
out := out.(*CustomResourceList)
|
||||||
|
*out = *in
|
||||||
|
if in.Items != nil {
|
||||||
|
in, out := &in.Items, &out.Items
|
||||||
|
*out = make([]CustomResource, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
(*out)[i] = *newVal.(*CustomResource)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResourceNames(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceNames)
|
||||||
|
out := out.(*CustomResourceNames)
|
||||||
|
*out = *in
|
||||||
|
if in.ShortNames != nil {
|
||||||
|
in, out := &in.ShortNames, &out.ShortNames
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResourceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceSpec)
|
||||||
|
out := out.(*CustomResourceSpec)
|
||||||
|
*out = *in
|
||||||
|
if newVal, err := c.DeepCopy(&in.Names); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Names = *newVal.(*CustomResourceNames)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeepCopy_apiextensions_CustomResourceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*CustomResourceStatus)
|
||||||
|
out := out.(*CustomResourceStatus)
|
||||||
|
*out = *in
|
||||||
|
if in.Conditions != nil {
|
||||||
|
in, out := &in.Conditions, &out.Conditions
|
||||||
|
*out = make([]CustomResourceCondition, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
(*out)[i] = *newVal.(*CustomResourceCondition)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if newVal, err := c.DeepCopy(&in.AcceptedNames); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.AcceptedNames = *newVal.(*CustomResourceNames)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,33 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["apiserver.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/version:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/server:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/registry/customresource:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,24 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"clientset.go",
|
||||||
|
"doc.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/github.com/golang/glog:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/util/flowcontrol:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
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 clientset
|
||||||
|
|
||||||
|
import (
|
||||||
|
glog "github.com/golang/glog"
|
||||||
|
discovery "k8s.io/client-go/discovery"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
|
apiextensionsv1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Interface interface {
|
||||||
|
Discovery() discovery.DiscoveryInterface
|
||||||
|
ApiextensionsV1alpha1() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface
|
||||||
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
|
Apiextensions() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
|
// version included in a Clientset.
|
||||||
|
type Clientset struct {
|
||||||
|
*discovery.DiscoveryClient
|
||||||
|
*apiextensionsv1alpha1.ApiextensionsV1alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApiextensionsV1alpha1 retrieves the ApiextensionsV1alpha1Client
|
||||||
|
func (c *Clientset) ApiextensionsV1alpha1() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.ApiextensionsV1alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Apiextensions retrieves the default version of ApiextensionsClient.
|
||||||
|
// Please explicitly pick a version.
|
||||||
|
func (c *Clientset) Apiextensions() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.ApiextensionsV1alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Discovery retrieves the DiscoveryClient
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.DiscoveryClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new Clientset for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
|
configShallowCopy := *c
|
||||||
|
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||||
|
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||||
|
}
|
||||||
|
var cs Clientset
|
||||||
|
var err error
|
||||||
|
cs.ApiextensionsV1alpha1Client, err = apiextensionsv1alpha1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("failed to create the DiscoveryClient: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &cs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.ApiextensionsV1alpha1Client = apiextensionsv1alpha1.NewForConfigOrDie(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
|
return &cs
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new Clientset for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.ApiextensionsV1alpha1Client = apiextensionsv1alpha1.New(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
|
return &cs
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated clientset.
|
||||||
|
package clientset
|
@@ -0,0 +1,34 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"clientset_generated.go",
|
||||||
|
"doc.go",
|
||||||
|
"register.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/testing:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1/fake:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
|
"k8s.io/client-go/discovery"
|
||||||
|
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||||
|
"k8s.io/client-go/testing"
|
||||||
|
clientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset"
|
||||||
|
apiextensionsv1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1"
|
||||||
|
fakeapiextensionsv1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1/fake"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||||
|
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||||
|
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||||
|
// for a real clientset and is mostly useful in simple unit tests.
|
||||||
|
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
|
o := testing.NewObjectTracker(registry, scheme, codecs.UniversalDecoder())
|
||||||
|
for _, obj := range objects {
|
||||||
|
if err := o.Add(obj); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fakePtr := testing.Fake{}
|
||||||
|
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o, registry.RESTMapper()))
|
||||||
|
|
||||||
|
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
||||||
|
|
||||||
|
return &Clientset{fakePtr}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||||
|
// struct to get a default implementation. This makes faking out just the method
|
||||||
|
// you want to test easier.
|
||||||
|
type Clientset struct {
|
||||||
|
testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ clientset.Interface = &Clientset{}
|
||||||
|
|
||||||
|
// ApiextensionsV1alpha1 retrieves the ApiextensionsV1alpha1Client
|
||||||
|
func (c *Clientset) ApiextensionsV1alpha1() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface {
|
||||||
|
return &fakeapiextensionsv1alpha1.FakeApiextensionsV1alpha1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apiextensions retrieves the ApiextensionsV1alpha1Client
|
||||||
|
func (c *Clientset) Apiextensions() apiextensionsv1alpha1.ApiextensionsV1alpha1Interface {
|
||||||
|
return &fakeapiextensionsv1alpha1.FakeApiextensionsV1alpha1{Fake: &c.Fake}
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated fake clientset.
|
||||||
|
package fake
|
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
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 (
|
||||||
|
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||||
|
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install"
|
||||||
|
os "os"
|
||||||
|
)
|
||||||
|
|
||||||
|
var scheme = runtime.NewScheme()
|
||||||
|
var codecs = serializer.NewCodecFactory(scheme)
|
||||||
|
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||||
|
|
||||||
|
var registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||||
|
var groupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install registers the API group and adds types to a scheme
|
||||||
|
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||||
|
apiextensions.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,24 @@
|
|||||||
|
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",
|
||||||
|
"register.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package contains the scheme of the automatically generated clientset.
|
||||||
|
package scheme
|
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
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 scheme
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
apiextensionsv1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Scheme = runtime.NewScheme()
|
||||||
|
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||||
|
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
AddToScheme(Scheme)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||||
|
// of clientsets, like in:
|
||||||
|
//
|
||||||
|
// import (
|
||||||
|
// "k8s.io/client-go/kubernetes"
|
||||||
|
// clientsetscheme "k8s.io/client-go/kuberentes/scheme"
|
||||||
|
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||||
|
// )
|
||||||
|
//
|
||||||
|
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||||
|
// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||||
|
//
|
||||||
|
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||||
|
// correctly.
|
||||||
|
func AddToScheme(scheme *runtime.Scheme) {
|
||||||
|
apiextensionsv1alpha1.AddToScheme(scheme)
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,28 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"apiextensions_client.go",
|
||||||
|
"customresource.go",
|
||||||
|
"doc.go",
|
||||||
|
"generated_expansion.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/scheme:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,88 @@
|
|||||||
|
/*
|
||||||
|
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 v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
"k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/scheme"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ApiextensionsV1alpha1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
CustomResourcesGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApiextensionsV1alpha1Client is used to interact with features provided by the apiextensions.k8s.io group.
|
||||||
|
type ApiextensionsV1alpha1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiextensionsV1alpha1Client) CustomResources() CustomResourceInterface {
|
||||||
|
return newCustomResources(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new ApiextensionsV1alpha1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*ApiextensionsV1alpha1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ApiextensionsV1alpha1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new ApiextensionsV1alpha1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1alpha1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new ApiextensionsV1alpha1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *ApiextensionsV1alpha1Client {
|
||||||
|
return &ApiextensionsV1alpha1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1alpha1.SchemeGroupVersion
|
||||||
|
config.GroupVersion = &gv
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *ApiextensionsV1alpha1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@@ -0,0 +1,161 @@
|
|||||||
|
/*
|
||||||
|
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 v1alpha1
|
||||||
|
|
||||||
|
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"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
scheme "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/scheme"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourcesGetter has a method to return a CustomResourceInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type CustomResourcesGetter interface {
|
||||||
|
CustomResources() CustomResourceInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomResourceInterface has methods to work with CustomResource resources.
|
||||||
|
type CustomResourceInterface interface {
|
||||||
|
Create(*v1alpha1.CustomResource) (*v1alpha1.CustomResource, error)
|
||||||
|
Update(*v1alpha1.CustomResource) (*v1alpha1.CustomResource, error)
|
||||||
|
UpdateStatus(*v1alpha1.CustomResource) (*v1alpha1.CustomResource, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1alpha1.CustomResource, error)
|
||||||
|
List(opts v1.ListOptions) (*v1alpha1.CustomResourceList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CustomResource, err error)
|
||||||
|
CustomResourceExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// customResources implements CustomResourceInterface
|
||||||
|
type customResources struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newCustomResources returns a CustomResources
|
||||||
|
func newCustomResources(c *ApiextensionsV1alpha1Client) *customResources {
|
||||||
|
return &customResources{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a customResource and creates it. Returns the server's representation of the customResource, and an error, if there is any.
|
||||||
|
func (c *customResources) Create(customResource *v1alpha1.CustomResource) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
result = &v1alpha1.CustomResource{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("customresources").
|
||||||
|
Body(customResource).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a customResource and updates it. Returns the server's representation of the customResource, and an error, if there is any.
|
||||||
|
func (c *customResources) Update(customResource *v1alpha1.CustomResource) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
result = &v1alpha1.CustomResource{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(customResource.Name).
|
||||||
|
Body(customResource).
|
||||||
|
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 *customResources) UpdateStatus(customResource *v1alpha1.CustomResource) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
result = &v1alpha1.CustomResource{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(customResource.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(customResource).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the customResource and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *customResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *customResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the customResource, and returns the corresponding customResource object, and an error if there is any.
|
||||||
|
func (c *customResources) Get(name string, options v1.GetOptions) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
result = &v1alpha1.CustomResource{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of CustomResources that match those selectors.
|
||||||
|
func (c *customResources) List(opts v1.ListOptions) (result *v1alpha1.CustomResourceList, err error) {
|
||||||
|
result = &v1alpha1.CustomResourceList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested customResources.
|
||||||
|
func (c *customResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched customResource.
|
||||||
|
func (c *customResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
result = &v1alpha1.CustomResource{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Resource("customresources").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1alpha1
|
@@ -0,0 +1,29 @@
|
|||||||
|
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_apiextensions_client.go",
|
||||||
|
"fake_customresource.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/testing:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset/typed/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeApiextensionsV1alpha1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeApiextensionsV1alpha1) CustomResources() v1alpha1.CustomResourceInterface {
|
||||||
|
return &FakeCustomResources{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeApiextensionsV1alpha1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
@@ -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 (
|
||||||
|
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"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeCustomResources implements CustomResourceInterface
|
||||||
|
type FakeCustomResources struct {
|
||||||
|
Fake *FakeApiextensionsV1alpha1
|
||||||
|
}
|
||||||
|
|
||||||
|
var customresourcesResource = schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1alpha1", Resource: "customresources"}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Create(customResource *v1alpha1.CustomResource) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(customresourcesResource, customResource), &v1alpha1.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Update(customResource *v1alpha1.CustomResource) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(customresourcesResource, customResource), &v1alpha1.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) UpdateStatus(customResource *v1alpha1.CustomResource) (*v1alpha1.CustomResource, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateSubresourceAction(customresourcesResource, "status", customResource), &v1alpha1.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteAction(customresourcesResource, name), &v1alpha1.CustomResource{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(customresourcesResource, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha1.CustomResourceList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Get(name string, options v1.GetOptions) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(customresourcesResource, name), &v1alpha1.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) List(opts v1.ListOptions) (result *v1alpha1.CustomResourceList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(customresourcesResource, opts), &v1alpha1.CustomResourceList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha1.CustomResourceList{}
|
||||||
|
for _, item := range obj.(*v1alpha1.CustomResourceList).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 customResources.
|
||||||
|
func (c *FakeCustomResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewRootWatchAction(customresourcesResource, opts))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched customResource.
|
||||||
|
func (c *FakeCustomResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(customresourcesResource, name, data, subresources...), &v1alpha1.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), err
|
||||||
|
}
|
@@ -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 v1alpha1
|
||||||
|
|
||||||
|
type CustomResourceExpansion interface{}
|
@@ -0,0 +1,24 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"clientset.go",
|
||||||
|
"doc.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/github.com/golang/glog:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/util/flowcontrol:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
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 internalclientset
|
||||||
|
|
||||||
|
import (
|
||||||
|
glog "github.com/golang/glog"
|
||||||
|
discovery "k8s.io/client-go/discovery"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
|
apiextensionsinternalversion "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Interface interface {
|
||||||
|
Discovery() discovery.DiscoveryInterface
|
||||||
|
Apiextensions() apiextensionsinternalversion.ApiextensionsInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
|
// version included in a Clientset.
|
||||||
|
type Clientset struct {
|
||||||
|
*discovery.DiscoveryClient
|
||||||
|
*apiextensionsinternalversion.ApiextensionsClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apiextensions retrieves the ApiextensionsClient
|
||||||
|
func (c *Clientset) Apiextensions() apiextensionsinternalversion.ApiextensionsInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.ApiextensionsClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// Discovery retrieves the DiscoveryClient
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.DiscoveryClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new Clientset for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
|
configShallowCopy := *c
|
||||||
|
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||||
|
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||||
|
}
|
||||||
|
var cs Clientset
|
||||||
|
var err error
|
||||||
|
cs.ApiextensionsClient, err = apiextensionsinternalversion.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("failed to create the DiscoveryClient: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &cs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.ApiextensionsClient = apiextensionsinternalversion.NewForConfigOrDie(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
|
return &cs
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new Clientset for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.ApiextensionsClient = apiextensionsinternalversion.New(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
|
return &cs
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated clientset.
|
||||||
|
package internalclientset
|
@@ -0,0 +1,34 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"clientset_generated.go",
|
||||||
|
"doc.go",
|
||||||
|
"register.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/testing:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
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 (
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
|
"k8s.io/client-go/discovery"
|
||||||
|
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||||
|
"k8s.io/client-go/testing"
|
||||||
|
clientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset"
|
||||||
|
apiextensionsinternalversion "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion"
|
||||||
|
fakeapiextensionsinternalversion "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||||
|
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||||
|
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||||
|
// for a real clientset and is mostly useful in simple unit tests.
|
||||||
|
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
|
o := testing.NewObjectTracker(registry, scheme, codecs.UniversalDecoder())
|
||||||
|
for _, obj := range objects {
|
||||||
|
if err := o.Add(obj); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fakePtr := testing.Fake{}
|
||||||
|
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o, registry.RESTMapper()))
|
||||||
|
|
||||||
|
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
||||||
|
|
||||||
|
return &Clientset{fakePtr}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||||
|
// struct to get a default implementation. This makes faking out just the method
|
||||||
|
// you want to test easier.
|
||||||
|
type Clientset struct {
|
||||||
|
testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ clientset.Interface = &Clientset{}
|
||||||
|
|
||||||
|
// Apiextensions retrieves the ApiextensionsClient
|
||||||
|
func (c *Clientset) Apiextensions() apiextensionsinternalversion.ApiextensionsInterface {
|
||||||
|
return &fakeapiextensionsinternalversion.FakeApiextensions{Fake: &c.Fake}
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated fake clientset.
|
||||||
|
package fake
|
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
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 (
|
||||||
|
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||||
|
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install"
|
||||||
|
os "os"
|
||||||
|
)
|
||||||
|
|
||||||
|
var scheme = runtime.NewScheme()
|
||||||
|
var codecs = serializer.NewCodecFactory(scheme)
|
||||||
|
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||||
|
|
||||||
|
var registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||||
|
var groupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install registers the API group and adds types to a scheme
|
||||||
|
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||||
|
apiextensions.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,26 @@
|
|||||||
|
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",
|
||||||
|
"register.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package contains the scheme of the automatically generated clientset.
|
||||||
|
package scheme
|
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
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 scheme
|
||||||
|
|
||||||
|
import (
|
||||||
|
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||||
|
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/install"
|
||||||
|
os "os"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Scheme = runtime.NewScheme()
|
||||||
|
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||||
|
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||||
|
|
||||||
|
var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||||
|
var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
Install(GroupFactoryRegistry, Registry, Scheme)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install registers the API group and adds types to a scheme
|
||||||
|
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||||
|
apiextensions.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"apiextensions_client.go",
|
||||||
|
"customresource.go",
|
||||||
|
"doc.go",
|
||||||
|
"generated_expansion.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/scheme:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
"k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/scheme"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ApiextensionsInterface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
CustomResourcesGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApiextensionsClient is used to interact with features provided by the apiextensions.k8s.io group.
|
||||||
|
type ApiextensionsClient struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiextensionsClient) CustomResources() CustomResourceInterface {
|
||||||
|
return newCustomResources(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new ApiextensionsClient for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*ApiextensionsClient, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &ApiextensionsClient{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new ApiextensionsClient for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *ApiextensionsClient {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new ApiextensionsClient for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *ApiextensionsClient {
|
||||||
|
return &ApiextensionsClient{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
g, err := scheme.Registry.Group("apiextensions.k8s.io")
|
||||||
|
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 {
|
||||||
|
gv := g.GroupVersion
|
||||||
|
config.GroupVersion = &gv
|
||||||
|
}
|
||||||
|
config.NegotiatedSerializer = scheme.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 *ApiextensionsClient) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@@ -0,0 +1,161 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
scheme "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/scheme"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourcesGetter has a method to return a CustomResourceInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type CustomResourcesGetter interface {
|
||||||
|
CustomResources() CustomResourceInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomResourceInterface has methods to work with CustomResource resources.
|
||||||
|
type CustomResourceInterface interface {
|
||||||
|
Create(*apiextensions.CustomResource) (*apiextensions.CustomResource, error)
|
||||||
|
Update(*apiextensions.CustomResource) (*apiextensions.CustomResource, error)
|
||||||
|
UpdateStatus(*apiextensions.CustomResource) (*apiextensions.CustomResource, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*apiextensions.CustomResource, error)
|
||||||
|
List(opts v1.ListOptions) (*apiextensions.CustomResourceList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensions.CustomResource, err error)
|
||||||
|
CustomResourceExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// customResources implements CustomResourceInterface
|
||||||
|
type customResources struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newCustomResources returns a CustomResources
|
||||||
|
func newCustomResources(c *ApiextensionsClient) *customResources {
|
||||||
|
return &customResources{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a customResource and creates it. Returns the server's representation of the customResource, and an error, if there is any.
|
||||||
|
func (c *customResources) Create(customResource *apiextensions.CustomResource) (result *apiextensions.CustomResource, err error) {
|
||||||
|
result = &apiextensions.CustomResource{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("customresources").
|
||||||
|
Body(customResource).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a customResource and updates it. Returns the server's representation of the customResource, and an error, if there is any.
|
||||||
|
func (c *customResources) Update(customResource *apiextensions.CustomResource) (result *apiextensions.CustomResource, err error) {
|
||||||
|
result = &apiextensions.CustomResource{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(customResource.Name).
|
||||||
|
Body(customResource).
|
||||||
|
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 *customResources) UpdateStatus(customResource *apiextensions.CustomResource) (result *apiextensions.CustomResource, err error) {
|
||||||
|
result = &apiextensions.CustomResource{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(customResource.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(customResource).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the customResource and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *customResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *customResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the customResource, and returns the corresponding customResource object, and an error if there is any.
|
||||||
|
func (c *customResources) Get(name string, options v1.GetOptions) (result *apiextensions.CustomResource, err error) {
|
||||||
|
result = &apiextensions.CustomResource{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of CustomResources that match those selectors.
|
||||||
|
func (c *customResources) List(opts v1.ListOptions) (result *apiextensions.CustomResourceList, err error) {
|
||||||
|
result = &apiextensions.CustomResourceList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested customResources.
|
||||||
|
func (c *customResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Resource("customresources").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched customResource.
|
||||||
|
func (c *customResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensions.CustomResource, err error) {
|
||||||
|
result = &apiextensions.CustomResource{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Resource("customresources").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package internalversion
|
@@ -0,0 +1,29 @@
|
|||||||
|
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_apiextensions_client.go",
|
||||||
|
"fake_customresource.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/testing:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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 custom arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
internalversion "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeApiextensions struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeApiextensions) CustomResources() internalversion.CustomResourceInterface {
|
||||||
|
return &FakeCustomResources{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeApiextensions) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
@@ -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 (
|
||||||
|
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"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeCustomResources implements CustomResourceInterface
|
||||||
|
type FakeCustomResources struct {
|
||||||
|
Fake *FakeApiextensions
|
||||||
|
}
|
||||||
|
|
||||||
|
var customresourcesResource = schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "", Resource: "customresources"}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Create(customResource *apiextensions.CustomResource) (result *apiextensions.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(customresourcesResource, customResource), &apiextensions.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Update(customResource *apiextensions.CustomResource) (result *apiextensions.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(customresourcesResource, customResource), &apiextensions.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) UpdateStatus(customResource *apiextensions.CustomResource) (*apiextensions.CustomResource, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateSubresourceAction(customresourcesResource, "status", customResource), &apiextensions.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteAction(customresourcesResource, name), &apiextensions.CustomResource{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(customresourcesResource, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &apiextensions.CustomResourceList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) Get(name string, options v1.GetOptions) (result *apiextensions.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(customresourcesResource, name), &apiextensions.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCustomResources) List(opts v1.ListOptions) (result *apiextensions.CustomResourceList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(customresourcesResource, opts), &apiextensions.CustomResourceList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &apiextensions.CustomResourceList{}
|
||||||
|
for _, item := range obj.(*apiextensions.CustomResourceList).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 customResources.
|
||||||
|
func (c *FakeCustomResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewRootWatchAction(customresourcesResource, opts))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched customResource.
|
||||||
|
func (c *FakeCustomResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensions.CustomResource, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(customresourcesResource, name, data, subresources...), &apiextensions.CustomResource{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), err
|
||||||
|
}
|
@@ -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 CustomResourceExpansion interface{}
|
@@ -0,0 +1,26 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"factory.go",
|
||||||
|
"generic.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,18 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["interface.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package apiextensions
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions/v1alpha1"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||||
|
V1alpha1() v1alpha1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1alpha1 returns a new v1alpha1.Interface.
|
||||||
|
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||||
|
return v1alpha1.New(g.SharedInformerFactory)
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"customresource.go",
|
||||||
|
"interface.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
apiextensions_v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
clientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/v1alpha1"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourceInformer provides access to a shared informer and lister for
|
||||||
|
// CustomResources.
|
||||||
|
type CustomResourceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.CustomResourceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type customResourceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCustomResourceInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ApiextensionsV1alpha1().CustomResources().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ApiextensionsV1alpha1().CustomResources().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&apiextensions_v1alpha1.CustomResource{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *customResourceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&apiextensions_v1alpha1.CustomResource{}, newCustomResourceInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *customResourceInformer) Lister() v1alpha1.CustomResourceLister {
|
||||||
|
return v1alpha1.NewCustomResourceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@@ -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 informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// CustomResources returns a CustomResourceInformer.
|
||||||
|
CustomResources() CustomResourceInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomResources returns a CustomResourceInformer.
|
||||||
|
func (v *version) CustomResources() CustomResourceInformer {
|
||||||
|
return &customResourceInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
@@ -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 informer-gen
|
||||||
|
|
||||||
|
package externalversions
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
clientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/apiextensions"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type sharedInformerFactory struct {
|
||||||
|
client clientset.Interface
|
||||||
|
lock sync.Mutex
|
||||||
|
defaultResync time.Duration
|
||||||
|
|
||||||
|
informers map[reflect.Type]cache.SharedIndexInformer
|
||||||
|
// startedInformers is used for tracking which informers have been started.
|
||||||
|
// This allows Start() to be called multiple times safely.
|
||||||
|
startedInformers map[reflect.Type]bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
||||||
|
func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||||
|
return &sharedInformerFactory{
|
||||||
|
client: client,
|
||||||
|
defaultResync: defaultResync,
|
||||||
|
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||||
|
startedInformers: make(map[reflect.Type]bool),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start initializes all requested informers.
|
||||||
|
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
for informerType, informer := range f.informers {
|
||||||
|
if !f.startedInformers[informerType] {
|
||||||
|
go informer.Run(stopCh)
|
||||||
|
f.startedInformers[informerType] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||||
|
// client.
|
||||||
|
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
informerType := reflect.TypeOf(obj)
|
||||||
|
informer, exists := f.informers[informerType]
|
||||||
|
if exists {
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
informer = newFunc(f.client, f.defaultResync)
|
||||||
|
f.informers[informerType] = informer
|
||||||
|
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// SharedInformerFactory provides shared informers for resources in all known
|
||||||
|
// API group versions.
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||||
|
|
||||||
|
Apiextensions() apiextensions.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Apiextensions() apiextensions.Interface {
|
||||||
|
return apiextensions.New(f)
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package externalversions
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
||||||
|
// sharedInformers based on type
|
||||||
|
type GenericInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() cache.GenericLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type genericInformer struct {
|
||||||
|
informer cache.SharedIndexInformer
|
||||||
|
resource schema.GroupResource
|
||||||
|
}
|
||||||
|
|
||||||
|
// Informer returns the SharedIndexInformer.
|
||||||
|
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lister returns the GenericLister.
|
||||||
|
func (f *genericInformer) Lister() cache.GenericLister {
|
||||||
|
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ForResource gives generic access to a shared informer of the matching type
|
||||||
|
// TODO extend this to unknown resources with a client pool
|
||||||
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||||
|
switch resource {
|
||||||
|
// Group=Apiextensions, Version=V1alpha1
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("customresources"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apiextensions().V1alpha1().CustomResources().Informer()}, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||||
|
}
|
@@ -0,0 +1,19 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["factory_interfaces.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package internalinterfaces
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
clientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/clientset"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type NewInformerFunc func(clientset.Interface, time.Duration) cache.SharedIndexInformer
|
||||||
|
|
||||||
|
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
Start(stopCh <-chan struct{})
|
||||||
|
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||||
|
}
|
@@ -0,0 +1,26 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"factory.go",
|
||||||
|
"generic.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,18 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["interface.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions/internalversion:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package apiextensions
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalversion "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions/internalversion"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// InternalVersion provides access to shared informers for resources in InternalVersion.
|
||||||
|
InternalVersion() internalversion.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// InternalVersion returns a new internalversion.Interface.
|
||||||
|
func (g *group) InternalVersion() internalversion.Interface {
|
||||||
|
return internalversion.New(g.SharedInformerFactory)
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"customresource.go",
|
||||||
|
"interface.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/internalversion:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
internalclientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces"
|
||||||
|
internalversion "k8s.io/kube-apiextensions-server/pkg/client/listers/apiextensions/internalversion"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourceInformer provides access to a shared informer and lister for
|
||||||
|
// CustomResources.
|
||||||
|
type CustomResourceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() internalversion.CustomResourceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type customResourceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCustomResourceInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.Apiextensions().CustomResources().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.Apiextensions().CustomResources().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&apiextensions.CustomResource{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *customResourceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&apiextensions.CustomResource{}, newCustomResourceInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *customResourceInformer) Lister() internalversion.CustomResourceLister {
|
||||||
|
return internalversion.NewCustomResourceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@@ -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 informer-gen
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// CustomResources returns a CustomResourceInformer.
|
||||||
|
CustomResources() CustomResourceInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomResources returns a CustomResourceInformer.
|
||||||
|
func (v *version) CustomResources() CustomResourceInformer {
|
||||||
|
return &customResourceInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
@@ -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 informer-gen
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
internalclientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/apiextensions"
|
||||||
|
internalinterfaces "k8s.io/kube-apiextensions-server/pkg/client/informers/internalversion/internalinterfaces"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type sharedInformerFactory struct {
|
||||||
|
client internalclientset.Interface
|
||||||
|
lock sync.Mutex
|
||||||
|
defaultResync time.Duration
|
||||||
|
|
||||||
|
informers map[reflect.Type]cache.SharedIndexInformer
|
||||||
|
// startedInformers is used for tracking which informers have been started.
|
||||||
|
// This allows Start() to be called multiple times safely.
|
||||||
|
startedInformers map[reflect.Type]bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
||||||
|
func NewSharedInformerFactory(client internalclientset.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||||
|
return &sharedInformerFactory{
|
||||||
|
client: client,
|
||||||
|
defaultResync: defaultResync,
|
||||||
|
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||||
|
startedInformers: make(map[reflect.Type]bool),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start initializes all requested informers.
|
||||||
|
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
for informerType, informer := range f.informers {
|
||||||
|
if !f.startedInformers[informerType] {
|
||||||
|
go informer.Run(stopCh)
|
||||||
|
f.startedInformers[informerType] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||||
|
// client.
|
||||||
|
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
informerType := reflect.TypeOf(obj)
|
||||||
|
informer, exists := f.informers[informerType]
|
||||||
|
if exists {
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
informer = newFunc(f.client, f.defaultResync)
|
||||||
|
f.informers[informerType] = informer
|
||||||
|
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// SharedInformerFactory provides shared informers for resources in all known
|
||||||
|
// API group versions.
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||||
|
|
||||||
|
Apiextensions() apiextensions.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Apiextensions() apiextensions.Interface {
|
||||||
|
return apiextensions.New(f)
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
||||||
|
// sharedInformers based on type
|
||||||
|
type GenericInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() cache.GenericLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type genericInformer struct {
|
||||||
|
informer cache.SharedIndexInformer
|
||||||
|
resource schema.GroupResource
|
||||||
|
}
|
||||||
|
|
||||||
|
// Informer returns the SharedIndexInformer.
|
||||||
|
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lister returns the GenericLister.
|
||||||
|
func (f *genericInformer) Lister() cache.GenericLister {
|
||||||
|
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ForResource gives generic access to a shared informer of the matching type
|
||||||
|
// TODO extend this to unknown resources with a client pool
|
||||||
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||||
|
switch resource {
|
||||||
|
// Group=Apiextensions, Version=InternalVersion
|
||||||
|
case apiextensions.SchemeGroupVersion.WithResource("customresources"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apiextensions().InternalVersion().CustomResources().Informer()}, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||||
|
}
|
@@ -0,0 +1,19 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["factory_interfaces.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package internalinterfaces
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
internalclientset "k8s.io/kube-apiextensions-server/pkg/client/clientset/internalclientset"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type NewInformerFunc func(internalclientset.Interface, time.Duration) cache.SharedIndexInformer
|
||||||
|
|
||||||
|
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
Start(stopCh <-chan struct{})
|
||||||
|
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||||
|
}
|
@@ -0,0 +1,24 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"customresource.go",
|
||||||
|
"expansion_generated.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
"k8s.io/client-go/tools/cache"
|
||||||
|
apiextensions "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourceLister helps list CustomResources.
|
||||||
|
type CustomResourceLister interface {
|
||||||
|
// List lists all CustomResources in the indexer.
|
||||||
|
List(selector labels.Selector) (ret []*apiextensions.CustomResource, err error)
|
||||||
|
// Get retrieves the CustomResource from the index for a given name.
|
||||||
|
Get(name string) (*apiextensions.CustomResource, error)
|
||||||
|
CustomResourceListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// customResourceLister implements the CustomResourceLister interface.
|
||||||
|
type customResourceLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCustomResourceLister returns a new CustomResourceLister.
|
||||||
|
func NewCustomResourceLister(indexer cache.Indexer) CustomResourceLister {
|
||||||
|
return &customResourceLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all CustomResources in the indexer.
|
||||||
|
func (s *customResourceLister) List(selector labels.Selector) (ret []*apiextensions.CustomResource, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*apiextensions.CustomResource))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the CustomResource from the index for a given name.
|
||||||
|
func (s *customResourceLister) Get(name string) (*apiextensions.CustomResource, error) {
|
||||||
|
key := &apiextensions.CustomResource{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||||
|
obj, exists, err := s.indexer.Get(key)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(apiextensions.Resource("customresource"), name)
|
||||||
|
}
|
||||||
|
return obj.(*apiextensions.CustomResource), nil
|
||||||
|
}
|
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
// CustomResourceListerExpansion allows custom methods to be added to
|
||||||
|
// CustomResourceLister.
|
||||||
|
type CustomResourceListerExpansion interface{}
|
@@ -0,0 +1,24 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"customresource.go",
|
||||||
|
"expansion_generated.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
"k8s.io/client-go/tools/cache"
|
||||||
|
v1alpha1 "k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CustomResourceLister helps list CustomResources.
|
||||||
|
type CustomResourceLister interface {
|
||||||
|
// List lists all CustomResources in the indexer.
|
||||||
|
List(selector labels.Selector) (ret []*v1alpha1.CustomResource, err error)
|
||||||
|
// Get retrieves the CustomResource from the index for a given name.
|
||||||
|
Get(name string) (*v1alpha1.CustomResource, error)
|
||||||
|
CustomResourceListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// customResourceLister implements the CustomResourceLister interface.
|
||||||
|
type customResourceLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCustomResourceLister returns a new CustomResourceLister.
|
||||||
|
func NewCustomResourceLister(indexer cache.Indexer) CustomResourceLister {
|
||||||
|
return &customResourceLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all CustomResources in the indexer.
|
||||||
|
func (s *customResourceLister) List(selector labels.Selector) (ret []*v1alpha1.CustomResource, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1alpha1.CustomResource))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the CustomResource from the index for a given name.
|
||||||
|
func (s *customResourceLister) Get(name string) (*v1alpha1.CustomResource, error) {
|
||||||
|
key := &v1alpha1.CustomResource{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||||
|
obj, exists, err := s.indexer.Get(key)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1alpha1.Resource("customresource"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.CustomResource), nil
|
||||||
|
}
|
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
// CustomResourceListerExpansion allows custom methods to be added to
|
||||||
|
// CustomResourceLister.
|
||||||
|
type CustomResourceListerExpansion interface{}
|
@@ -0,0 +1,21 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = ["start.go"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/github.com/spf13/cobra:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/server:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/server/options:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions/v1alpha1:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apiserver:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -0,0 +1,29 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"etcd.go",
|
||||||
|
"strategy.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/storage:go_default_library",
|
||||||
|
"//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library",
|
||||||
|
"//vendor/k8s.io/kube-apiextensions-server/pkg/apis/apiextensions:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
@@ -99,7 +99,7 @@ func newRS(namespace string) *v1beta1.ReplicaSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var cascDel string = `
|
var cascDel = `
|
||||||
{
|
{
|
||||||
"kind": "DeleteOptions",
|
"kind": "DeleteOptions",
|
||||||
"apiVersion": "` + api.Registry.GroupOrDie(api.GroupName).GroupVersion.String() + `",
|
"apiVersion": "` + api.Registry.GroupOrDie(api.GroupName).GroupVersion.String() + `",
|
||||||
|
Reference in New Issue
Block a user