mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-21 02:20:34 +00:00
Merge pull request #140 from caesarxuchao/generated-by-scripts
Generated by robot
This commit is contained in:
commit
2cb68a18c3
118
Godeps/Godeps.json
generated
118
Godeps/Godeps.json
generated
@ -1,24 +1,21 @@
|
|||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/client-go",
|
"ImportPath": "k8s.io/client-go",
|
||||||
"GoVersion": "go1.7",
|
"GoVersion": "go1.7",
|
||||||
"GodepVersion": "v75",
|
"GodepVersion": "v79",
|
||||||
"Packages": [
|
"Packages": [
|
||||||
"./..."
|
"./..."
|
||||||
],
|
],
|
||||||
"Deps": [
|
"Deps": [
|
||||||
{
|
{
|
||||||
"ImportPath": "cloud.google.com/go/compute/metadata",
|
"ImportPath": "cloud.google.com/go/compute/metadata",
|
||||||
"Comment": "v0.1.0-115-g3b1ae45",
|
|
||||||
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
|
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "cloud.google.com/go/internal",
|
"ImportPath": "cloud.google.com/go/internal",
|
||||||
"Comment": "v0.1.0-115-g3b1ae45",
|
|
||||||
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
|
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/PuerkitoBio/purell",
|
"ImportPath": "github.com/PuerkitoBio/purell",
|
||||||
"Comment": "v1.0.0",
|
|
||||||
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
|
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -27,37 +24,34 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/go-oidc/http",
|
"ImportPath": "github.com/coreos/go-oidc/http",
|
||||||
"Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
|
"Rev": "be73733bb8cc830d0205609b95d125215f8e9c70"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/go-oidc/jose",
|
"ImportPath": "github.com/coreos/go-oidc/jose",
|
||||||
"Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
|
"Rev": "be73733bb8cc830d0205609b95d125215f8e9c70"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/go-oidc/key",
|
"ImportPath": "github.com/coreos/go-oidc/key",
|
||||||
"Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
|
"Rev": "be73733bb8cc830d0205609b95d125215f8e9c70"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/go-oidc/oauth2",
|
"ImportPath": "github.com/coreos/go-oidc/oauth2",
|
||||||
"Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
|
"Rev": "be73733bb8cc830d0205609b95d125215f8e9c70"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/go-oidc/oidc",
|
"ImportPath": "github.com/coreos/go-oidc/oidc",
|
||||||
"Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
|
"Rev": "be73733bb8cc830d0205609b95d125215f8e9c70"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/pkg/health",
|
"ImportPath": "github.com/coreos/pkg/health",
|
||||||
"Comment": "v2-8-gfa29b1d",
|
|
||||||
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/pkg/httputil",
|
"ImportPath": "github.com/coreos/pkg/httputil",
|
||||||
"Comment": "v2-8-gfa29b1d",
|
|
||||||
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/coreos/pkg/timeutil",
|
"ImportPath": "github.com/coreos/pkg/timeutil",
|
||||||
"Comment": "v2-8-gfa29b1d",
|
|
||||||
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -66,27 +60,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/docker/distribution/digest",
|
"ImportPath": "github.com/docker/distribution/digest",
|
||||||
"Comment": "v2.4.0-rc.1-38-gcd27f179",
|
|
||||||
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/docker/distribution/reference",
|
"ImportPath": "github.com/docker/distribution/reference",
|
||||||
"Comment": "v2.4.0-rc.1-38-gcd27f179",
|
|
||||||
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/emicklei/go-restful",
|
"ImportPath": "github.com/emicklei/go-restful",
|
||||||
"Comment": "v1.2-96-g09691a3",
|
|
||||||
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/emicklei/go-restful/log",
|
"ImportPath": "github.com/emicklei/go-restful/log",
|
||||||
"Comment": "v1.2-96-g09691a3",
|
|
||||||
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/emicklei/go-restful/swagger",
|
"ImportPath": "github.com/emicklei/go-restful/swagger",
|
||||||
"Comment": "v1.2-96-g09691a3",
|
|
||||||
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -111,12 +100,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gogo/protobuf/proto",
|
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||||
"Comment": "v0.2-33-ge18d7aa8",
|
|
||||||
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
||||||
"Comment": "v0.2-33-ge18d7aa8",
|
|
||||||
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -141,7 +128,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/imdario/mergo",
|
"ImportPath": "github.com/imdario/mergo",
|
||||||
"Comment": "0.1.3-8-g6633656",
|
|
||||||
"Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
|
"Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -170,11 +156,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/spf13/pflag",
|
"ImportPath": "github.com/spf13/pflag",
|
||||||
"Rev": "5ccb023bc27df288a957c5e994cd44fd19619465"
|
"Rev": "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/stretchr/testify/assert",
|
"ImportPath": "github.com/stretchr/testify/assert",
|
||||||
"Comment": "v1.0-88-ge3a8ff8",
|
|
||||||
"Rev": "e3a8ff8ce36581f87a15341206f205b1da467059"
|
"Rev": "e3a8ff8ce36581f87a15341206f205b1da467059"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -307,7 +292,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "gopkg.in/inf.v0",
|
"ImportPath": "gopkg.in/inf.v0",
|
||||||
"Comment": "v0.9.0",
|
|
||||||
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
|
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -316,179 +300,179 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/openapi",
|
"ImportPath": "k8s.io/apimachinery/pkg/openapi",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||||
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
"Rev": "6dcbb207c0333b9e0f98e8ba6955907421288566"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,9 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V
|
|||||||
unionMapper := meta.MultiRESTMapper{}
|
unionMapper := meta.MultiRESTMapper{}
|
||||||
|
|
||||||
var groupPriority []string
|
var groupPriority []string
|
||||||
var resourcePriority []schema.GroupVersionResource
|
// /v1 is special. It should always come first
|
||||||
var kindPriority []schema.GroupVersionKind
|
resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}}
|
||||||
|
kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}}
|
||||||
|
|
||||||
for _, group := range groupResources {
|
for _, group := range groupResources {
|
||||||
groupPriority = append(groupPriority, group.Group.Name)
|
groupPriority = append(groupPriority, group.Group.Name)
|
||||||
|
@ -35,6 +35,21 @@ import (
|
|||||||
|
|
||||||
func TestRESTMapper(t *testing.T) {
|
func TestRESTMapper(t *testing.T) {
|
||||||
resources := []*APIGroupResources{
|
resources := []*APIGroupResources{
|
||||||
|
{
|
||||||
|
Group: metav1.APIGroup{
|
||||||
|
Name: "extensions",
|
||||||
|
Versions: []metav1.GroupVersionForDiscovery{
|
||||||
|
{Version: "v1beta"},
|
||||||
|
},
|
||||||
|
PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"},
|
||||||
|
},
|
||||||
|
VersionedResources: map[string][]metav1.APIResource{
|
||||||
|
"v1beta": {
|
||||||
|
{Name: "jobs", Namespaced: true, Kind: "Job"},
|
||||||
|
{Name: "pods", Namespaced: true, Kind: "Pod"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Group: metav1.APIGroup{
|
Group: metav1.APIGroup{
|
||||||
Versions: []metav1.GroupVersionForDiscovery{
|
Versions: []metav1.GroupVersionForDiscovery{
|
||||||
@ -52,20 +67,6 @@ func TestRESTMapper(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Group: metav1.APIGroup{
|
|
||||||
Name: "extensions",
|
|
||||||
Versions: []metav1.GroupVersionForDiscovery{
|
|
||||||
{Version: "v1beta"},
|
|
||||||
},
|
|
||||||
PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"},
|
|
||||||
},
|
|
||||||
VersionedResources: map[string][]metav1.APIResource{
|
|
||||||
"v1beta": {
|
|
||||||
{Name: "jobs", Namespaced: true, Kind: "Job"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restMapper := NewRESTMapper(resources, nil)
|
restMapper := NewRESTMapper(resources, nil)
|
||||||
@ -74,6 +75,15 @@ func TestRESTMapper(t *testing.T) {
|
|||||||
input schema.GroupVersionResource
|
input schema.GroupVersionResource
|
||||||
want schema.GroupVersionKind
|
want schema.GroupVersionKind
|
||||||
}{
|
}{
|
||||||
|
{
|
||||||
|
input: schema.GroupVersionResource{
|
||||||
|
Resource: "pods",
|
||||||
|
},
|
||||||
|
want: schema.GroupVersionKind{
|
||||||
|
Version: "v1",
|
||||||
|
Kind: "Pod",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
input: schema.GroupVersionResource{
|
input: schema.GroupVersionResource{
|
||||||
Version: "v1",
|
Version: "v1",
|
||||||
@ -131,6 +141,15 @@ func TestRESTMapper(t *testing.T) {
|
|||||||
input schema.GroupVersionResource
|
input schema.GroupVersionResource
|
||||||
want schema.GroupVersionResource
|
want schema.GroupVersionResource
|
||||||
}{
|
}{
|
||||||
|
{
|
||||||
|
input: schema.GroupVersionResource{
|
||||||
|
Resource: "pods",
|
||||||
|
},
|
||||||
|
want: schema.GroupVersionResource{
|
||||||
|
Version: "v1",
|
||||||
|
Resource: "pods",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
input: schema.GroupVersionResource{
|
input: schema.GroupVersionResource{
|
||||||
Version: "v1",
|
Version: "v1",
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// This file was automatically generated by informer-gen
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v2alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -24,34 +24,34 @@ import (
|
|||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
|
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
|
||||||
batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
apps_v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
time "time"
|
time "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// JobInformer provides access to a shared informer and lister for
|
// DeploymentInformer provides access to a shared informer and lister for
|
||||||
// Jobs.
|
// Deployments.
|
||||||
type JobInformer interface {
|
type DeploymentInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2alpha1.JobLister
|
Lister() v1beta1.DeploymentLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type jobInformer struct {
|
type deploymentInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
func newDeploymentInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.BatchV2alpha1().Jobs(v1.NamespaceAll).List(options)
|
return client.AppsV1beta1().Deployments(v1.NamespaceAll).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.BatchV2alpha1().Jobs(v1.NamespaceAll).Watch(options)
|
return client.AppsV1beta1().Deployments(v1.NamespaceAll).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&batch_v2alpha1.Job{},
|
&apps_v1beta1.Deployment{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
)
|
)
|
||||||
@ -59,10 +59,10 @@ func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cac
|
|||||||
return sharedIndexInformer
|
return sharedIndexInformer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *jobInformer) Informer() cache.SharedIndexInformer {
|
func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&batch_v2alpha1.Job{}, newJobInformer)
|
return f.factory.InformerFor(&apps_v1beta1.Deployment{}, newDeploymentInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *jobInformer) Lister() v2alpha1.JobLister {
|
func (f *deploymentInformer) Lister() v1beta1.DeploymentLister {
|
||||||
return v2alpha1.NewJobLister(f.Informer().GetIndexer())
|
return v1beta1.NewDeploymentLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
@ -24,6 +24,8 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
|
// Deployments returns a DeploymentInformer.
|
||||||
|
Deployments() DeploymentInformer
|
||||||
// StatefulSets returns a StatefulSetInformer.
|
// StatefulSets returns a StatefulSetInformer.
|
||||||
StatefulSets() StatefulSetInformer
|
StatefulSets() StatefulSetInformer
|
||||||
}
|
}
|
||||||
@ -37,6 +39,11 @@ func New(f internalinterfaces.SharedInformerFactory) Interface {
|
|||||||
return &version{f}
|
return &version{f}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deployments returns a DeploymentInformer.
|
||||||
|
func (v *version) Deployments() DeploymentInformer {
|
||||||
|
return &deploymentInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
// StatefulSets returns a StatefulSetInformer.
|
// StatefulSets returns a StatefulSetInformer.
|
||||||
func (v *version) StatefulSets() StatefulSetInformer {
|
func (v *version) StatefulSets() StatefulSetInformer {
|
||||||
return &statefulSetInformer{factory: v.SharedInformerFactory}
|
return &statefulSetInformer{factory: v.SharedInformerFactory}
|
||||||
|
@ -26,8 +26,6 @@ import (
|
|||||||
type Interface interface {
|
type Interface interface {
|
||||||
// CronJobs returns a CronJobInformer.
|
// CronJobs returns a CronJobInformer.
|
||||||
CronJobs() CronJobInformer
|
CronJobs() CronJobInformer
|
||||||
// Jobs returns a JobInformer.
|
|
||||||
Jobs() JobInformer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
@ -43,8 +41,3 @@ func New(f internalinterfaces.SharedInformerFactory) Interface {
|
|||||||
func (v *version) CronJobs() CronJobInformer {
|
func (v *version) CronJobs() CronJobInformer {
|
||||||
return &cronJobInformer{factory: v.SharedInformerFactory}
|
return &cronJobInformer{factory: v.SharedInformerFactory}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Jobs returns a JobInformer.
|
|
||||||
func (v *version) Jobs() JobInformer {
|
|
||||||
return &jobInformer{factory: v.SharedInformerFactory}
|
|
||||||
}
|
|
||||||
|
@ -30,6 +30,7 @@ import (
|
|||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
policy "k8s.io/client-go/informers/policy"
|
policy "k8s.io/client-go/informers/policy"
|
||||||
rbac "k8s.io/client-go/informers/rbac"
|
rbac "k8s.io/client-go/informers/rbac"
|
||||||
|
settings "k8s.io/client-go/informers/settings"
|
||||||
storage "k8s.io/client-go/informers/storage"
|
storage "k8s.io/client-go/informers/storage"
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
@ -103,6 +104,7 @@ type SharedInformerFactory interface {
|
|||||||
Extensions() extensions.Interface
|
Extensions() extensions.Interface
|
||||||
Policy() policy.Interface
|
Policy() policy.Interface
|
||||||
Rbac() rbac.Interface
|
Rbac() rbac.Interface
|
||||||
|
Settings() settings.Interface
|
||||||
Storage() storage.Interface
|
Storage() storage.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,6 +140,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
|
|||||||
return rbac.New(f)
|
return rbac.New(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Settings() settings.Interface {
|
||||||
|
return settings.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
func (f *sharedInformerFactory) Storage() storage.Interface {
|
func (f *sharedInformerFactory) Storage() storage.Interface {
|
||||||
return storage.New(f)
|
return storage.New(f)
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,8 @@ import (
|
|||||||
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
storage_v1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
)
|
)
|
||||||
@ -63,6 +65,8 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
|||||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||||
switch resource {
|
switch resource {
|
||||||
// Group=Apps, Version=V1beta1
|
// Group=Apps, Version=V1beta1
|
||||||
|
case v1beta1.SchemeGroupVersion.WithResource("deployments"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().Deployments().Informer()}, nil
|
||||||
case v1beta1.SchemeGroupVersion.WithResource("statefulsets"):
|
case v1beta1.SchemeGroupVersion.WithResource("statefulsets"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
|
||||||
|
|
||||||
@ -81,8 +85,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
// Group=Batch, Version=V2alpha1
|
// Group=Batch, Version=V2alpha1
|
||||||
case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
|
case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
|
||||||
case batch_v2alpha1.SchemeGroupVersion.WithResource("jobs"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().Jobs().Informer()}, nil
|
|
||||||
|
|
||||||
// Group=Certificates, Version=V1beta1
|
// Group=Certificates, Version=V1beta1
|
||||||
case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
||||||
@ -160,6 +162,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
|
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Settings, Version=V1alpha1
|
||||||
|
case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Storage, Version=V1
|
||||||
|
case storage_v1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil
|
||||||
|
|
||||||
// Group=Storage, Version=V1beta1
|
// Group=Storage, Version=V1beta1
|
||||||
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
|
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
|
||||||
|
44
informers/settings/interface.go
Normal file
44
informers/settings/interface.go
Normal file
@ -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 settings
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
v1alpha1 "k8s.io/client-go/informers/settings/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
43
informers/settings/v1alpha1/interface.go
Normal file
43
informers/settings/v1alpha1/interface.go
Normal file
@ -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/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// PodPresets returns a PodPresetInformer.
|
||||||
|
PodPresets() PodPresetInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodPresets returns a PodPresetInformer.
|
||||||
|
func (v *version) PodPresets() PodPresetInformer {
|
||||||
|
return &podPresetInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/settings/v1alpha1/podpreset.go
Normal file
68
informers/settings/v1alpha1/podpreset.go
Normal file
@ -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"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
|
||||||
|
settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodPresetInformer provides access to a shared informer and lister for
|
||||||
|
// PodPresets.
|
||||||
|
type PodPresetInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.PodPresetLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type podPresetInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPodPresetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&settings_v1alpha1.PodPreset{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, newPodPresetInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
|
||||||
|
return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -20,11 +20,14 @@ package storage
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
v1 "k8s.io/client-go/informers/storage/v1"
|
||||||
v1beta1 "k8s.io/client-go/informers/storage/v1beta1"
|
v1beta1 "k8s.io/client-go/informers/storage/v1beta1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Interface provides access to each of this group's versions.
|
// Interface provides access to each of this group's versions.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.Interface
|
||||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
V1beta1() v1beta1.Interface
|
V1beta1() v1beta1.Interface
|
||||||
}
|
}
|
||||||
@ -38,6 +41,11 @@ func New(f internalinterfaces.SharedInformerFactory) Interface {
|
|||||||
return &group{f}
|
return &group{f}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.New(g.SharedInformerFactory)
|
||||||
|
}
|
||||||
|
|
||||||
// V1beta1 returns a new v1beta1.Interface.
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
func (g *group) V1beta1() v1beta1.Interface {
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
return v1beta1.New(g.SharedInformerFactory)
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
43
informers/storage/v1/interface.go
Normal file
43
informers/storage/v1/interface.go
Normal file
@ -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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// StorageClasses returns a StorageClassInformer.
|
||||||
|
StorageClasses() StorageClassInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageClasses returns a StorageClassInformer.
|
||||||
|
func (v *version) StorageClasses() StorageClassInformer {
|
||||||
|
return &storageClassInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/storage/v1/storageclass.go
Normal file
68
informers/storage/v1/storageclass.go
Normal file
@ -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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/storage/v1"
|
||||||
|
storage_v1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StorageClassInformer provides access to a shared informer and lister for
|
||||||
|
// StorageClasses.
|
||||||
|
type StorageClassInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.StorageClassLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type storageClassInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.StorageV1().StorageClasses().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.StorageV1().StorageClasses().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&storage_v1.StorageClass{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&storage_v1.StorageClass{}, newStorageClassInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *storageClassInformer) Lister() v1.StorageClassLister {
|
||||||
|
return v1.NewStorageClassLister(f.Informer().GetIndexer())
|
||||||
|
}
|
1
kubernetes-sha
Normal file
1
kubernetes-sha
Normal file
@ -0,0 +1 @@
|
|||||||
|
9497139cb62015905ba5b3d11836f2b0c117ff80
|
@ -17,99 +17,102 @@ limitations under the License.
|
|||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/golang/glog"
|
glog "github.com/golang/glog"
|
||||||
discovery "k8s.io/client-go/discovery"
|
discovery "k8s.io/client-go/discovery"
|
||||||
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
||||||
v1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
||||||
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
||||||
v1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
||||||
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
||||||
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
||||||
v2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
||||||
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||||
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
||||||
v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||||
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
|
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
v1beta1extensions "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
v1beta1policy "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
||||||
v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
||||||
v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
||||||
v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
|
||||||
|
storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
|
||||||
|
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
"k8s.io/client-go/util/flowcontrol"
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
Discovery() discovery.DiscoveryInterface
|
Discovery() discovery.DiscoveryInterface
|
||||||
CoreV1() v1core.CoreV1Interface
|
CoreV1() corev1.CoreV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Core() v1core.CoreV1Interface
|
Core() corev1.CoreV1Interface
|
||||||
AppsV1beta1() v1beta1apps.AppsV1beta1Interface
|
AppsV1beta1() appsv1beta1.AppsV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Apps() v1beta1apps.AppsV1beta1Interface
|
Apps() appsv1beta1.AppsV1beta1Interface
|
||||||
AuthenticationV1() v1authentication.AuthenticationV1Interface
|
AuthenticationV1() authenticationv1.AuthenticationV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Authentication() v1authentication.AuthenticationV1Interface
|
Authentication() authenticationv1.AuthenticationV1Interface
|
||||||
AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface
|
AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
|
||||||
|
AuthorizationV1() authorizationv1.AuthorizationV1Interface
|
||||||
AuthorizationV1() v1authorization.AuthorizationV1Interface
|
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Authorization() v1authorization.AuthorizationV1Interface
|
Authorization() authorizationv1.AuthorizationV1Interface
|
||||||
AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface
|
AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface
|
||||||
|
AutoscalingV1() autoscalingv1.AutoscalingV1Interface
|
||||||
AutoscalingV1() v1autoscaling.AutoscalingV1Interface
|
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Autoscaling() v1autoscaling.AutoscalingV1Interface
|
Autoscaling() autoscalingv1.AutoscalingV1Interface
|
||||||
AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface
|
AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface
|
||||||
|
BatchV1() batchv1.BatchV1Interface
|
||||||
BatchV1() v1batch.BatchV1Interface
|
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Batch() v1batch.BatchV1Interface
|
Batch() batchv1.BatchV1Interface
|
||||||
BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
|
BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
|
||||||
|
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
|
||||||
CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface
|
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Certificates() v1beta1certificates.CertificatesV1beta1Interface
|
Certificates() certificatesv1beta1.CertificatesV1beta1Interface
|
||||||
ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface
|
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Extensions() v1beta1extensions.ExtensionsV1beta1Interface
|
Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||||
PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface
|
PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Policy() v1beta1policy.PolicyV1beta1Interface
|
Policy() policyv1beta1.PolicyV1beta1Interface
|
||||||
RbacV1beta1() v1beta1rbac.RbacV1beta1Interface
|
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Rbac() v1beta1rbac.RbacV1beta1Interface
|
Rbac() rbacv1beta1.RbacV1beta1Interface
|
||||||
RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface
|
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
|
||||||
|
SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
|
||||||
StorageV1beta1() v1beta1storage.StorageV1beta1Interface
|
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Storage() v1beta1storage.StorageV1beta1Interface
|
Settings() settingsv1alpha1.SettingsV1alpha1Interface
|
||||||
|
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
|
||||||
|
StorageV1() storagev1.StorageV1Interface
|
||||||
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
|
Storage() storagev1.StorageV1Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset contains the clients for groups. Each group has exactly one
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
// version included in a Clientset.
|
// version included in a Clientset.
|
||||||
type Clientset struct {
|
type Clientset struct {
|
||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*v1core.CoreV1Client
|
*corev1.CoreV1Client
|
||||||
*v1beta1apps.AppsV1beta1Client
|
*appsv1beta1.AppsV1beta1Client
|
||||||
*v1authentication.AuthenticationV1Client
|
*authenticationv1.AuthenticationV1Client
|
||||||
*v1beta1authentication.AuthenticationV1beta1Client
|
*authenticationv1beta1.AuthenticationV1beta1Client
|
||||||
*v1authorization.AuthorizationV1Client
|
*authorizationv1.AuthorizationV1Client
|
||||||
*v1beta1authorization.AuthorizationV1beta1Client
|
*authorizationv1beta1.AuthorizationV1beta1Client
|
||||||
*v1autoscaling.AutoscalingV1Client
|
*autoscalingv1.AutoscalingV1Client
|
||||||
*v2alpha1autoscaling.AutoscalingV2alpha1Client
|
*autoscalingv2alpha1.AutoscalingV2alpha1Client
|
||||||
*v1batch.BatchV1Client
|
*batchv1.BatchV1Client
|
||||||
*v2alpha1batch.BatchV2alpha1Client
|
*batchv2alpha1.BatchV2alpha1Client
|
||||||
*v1beta1certificates.CertificatesV1beta1Client
|
*certificatesv1beta1.CertificatesV1beta1Client
|
||||||
*v1beta1extensions.ExtensionsV1beta1Client
|
*extensionsv1beta1.ExtensionsV1beta1Client
|
||||||
*v1beta1policy.PolicyV1beta1Client
|
*policyv1beta1.PolicyV1beta1Client
|
||||||
*v1beta1rbac.RbacV1beta1Client
|
*rbacv1beta1.RbacV1beta1Client
|
||||||
*v1alpha1rbac.RbacV1alpha1Client
|
*rbacv1alpha1.RbacV1alpha1Client
|
||||||
*v1beta1storage.StorageV1beta1Client
|
*settingsv1alpha1.SettingsV1alpha1Client
|
||||||
|
*storagev1beta1.StorageV1beta1Client
|
||||||
|
*storagev1.StorageV1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// CoreV1 retrieves the CoreV1Client
|
// CoreV1 retrieves the CoreV1Client
|
||||||
func (c *Clientset) CoreV1() v1core.CoreV1Interface {
|
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -118,7 +121,7 @@ func (c *Clientset) CoreV1() v1core.CoreV1Interface {
|
|||||||
|
|
||||||
// Deprecated: Core retrieves the default version of CoreClient.
|
// Deprecated: Core retrieves the default version of CoreClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Core() v1core.CoreV1Interface {
|
func (c *Clientset) Core() corev1.CoreV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -126,7 +129,7 @@ func (c *Clientset) Core() v1core.CoreV1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AppsV1beta1 retrieves the AppsV1beta1Client
|
// AppsV1beta1 retrieves the AppsV1beta1Client
|
||||||
func (c *Clientset) AppsV1beta1() v1beta1apps.AppsV1beta1Interface {
|
func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -135,7 +138,7 @@ func (c *Clientset) AppsV1beta1() v1beta1apps.AppsV1beta1Interface {
|
|||||||
|
|
||||||
// Deprecated: Apps retrieves the default version of AppsClient.
|
// Deprecated: Apps retrieves the default version of AppsClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Apps() v1beta1apps.AppsV1beta1Interface {
|
func (c *Clientset) Apps() appsv1beta1.AppsV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -143,7 +146,7 @@ func (c *Clientset) Apps() v1beta1apps.AppsV1beta1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuthenticationV1 retrieves the AuthenticationV1Client
|
// AuthenticationV1 retrieves the AuthenticationV1Client
|
||||||
func (c *Clientset) AuthenticationV1() v1authentication.AuthenticationV1Interface {
|
func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -152,7 +155,7 @@ func (c *Clientset) AuthenticationV1() v1authentication.AuthenticationV1Interfac
|
|||||||
|
|
||||||
// Deprecated: Authentication retrieves the default version of AuthenticationClient.
|
// Deprecated: Authentication retrieves the default version of AuthenticationClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Authentication() v1authentication.AuthenticationV1Interface {
|
func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -160,7 +163,7 @@ func (c *Clientset) Authentication() v1authentication.AuthenticationV1Interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
||||||
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -168,7 +171,7 @@ func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.Authentication
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationV1 retrieves the AuthorizationV1Client
|
// AuthorizationV1 retrieves the AuthorizationV1Client
|
||||||
func (c *Clientset) AuthorizationV1() v1authorization.AuthorizationV1Interface {
|
func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -177,7 +180,7 @@ func (c *Clientset) AuthorizationV1() v1authorization.AuthorizationV1Interface {
|
|||||||
|
|
||||||
// Deprecated: Authorization retrieves the default version of AuthorizationClient.
|
// Deprecated: Authorization retrieves the default version of AuthorizationClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Authorization() v1authorization.AuthorizationV1Interface {
|
func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -185,7 +188,7 @@ func (c *Clientset) Authorization() v1authorization.AuthorizationV1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
||||||
func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface {
|
func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -193,7 +196,7 @@ func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1b
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AutoscalingV1 retrieves the AutoscalingV1Client
|
// AutoscalingV1 retrieves the AutoscalingV1Client
|
||||||
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -202,7 +205,7 @@ func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
|||||||
|
|
||||||
// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
|
// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -210,7 +213,7 @@ func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
||||||
func (c *Clientset) AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface {
|
func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -218,7 +221,7 @@ func (c *Clientset) AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -227,7 +230,7 @@ func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
|||||||
|
|
||||||
// Deprecated: Batch retrieves the default version of BatchClient.
|
// Deprecated: Batch retrieves the default version of BatchClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Batch() v1batch.BatchV1Interface {
|
func (c *Clientset) Batch() batchv1.BatchV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -235,7 +238,7 @@ func (c *Clientset) Batch() v1batch.BatchV1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
||||||
func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface {
|
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -243,7 +246,7 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
||||||
func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface {
|
func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -252,7 +255,7 @@ func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta
|
|||||||
|
|
||||||
// Deprecated: Certificates retrieves the default version of CertificatesClient.
|
// Deprecated: Certificates retrieves the default version of CertificatesClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface {
|
func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -260,7 +263,7 @@ func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interf
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
||||||
func (c *Clientset) ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface {
|
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -269,7 +272,7 @@ func (c *Clientset) ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Inter
|
|||||||
|
|
||||||
// Deprecated: Extensions retrieves the default version of ExtensionsClient.
|
// Deprecated: Extensions retrieves the default version of ExtensionsClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsV1beta1Interface {
|
func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -277,7 +280,7 @@ func (c *Clientset) Extensions() v1beta1extensions.ExtensionsV1beta1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
||||||
func (c *Clientset) PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface {
|
func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -286,7 +289,7 @@ func (c *Clientset) PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface {
|
|||||||
|
|
||||||
// Deprecated: Policy retrieves the default version of PolicyClient.
|
// Deprecated: Policy retrieves the default version of PolicyClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface {
|
func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -294,7 +297,7 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RbacV1beta1 retrieves the RbacV1beta1Client
|
// RbacV1beta1 retrieves the RbacV1beta1Client
|
||||||
func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface {
|
func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -303,7 +306,7 @@ func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface {
|
|||||||
|
|
||||||
// Deprecated: Rbac retrieves the default version of RbacClient.
|
// Deprecated: Rbac retrieves the default version of RbacClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface {
|
func (c *Clientset) Rbac() rbacv1beta1.RbacV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -311,28 +314,53 @@ func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return c.RbacV1alpha1Client
|
return c.RbacV1alpha1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
|
||||||
|
func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.SettingsV1alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Settings retrieves the default version of SettingsClient.
|
||||||
|
// Please explicitly pick a version.
|
||||||
|
func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.SettingsV1alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
// StorageV1beta1 retrieves the StorageV1beta1Client
|
// StorageV1beta1 retrieves the StorageV1beta1Client
|
||||||
func (c *Clientset) StorageV1beta1() v1beta1storage.StorageV1beta1Interface {
|
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return c.StorageV1beta1Client
|
return c.StorageV1beta1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Storage retrieves the default version of StorageClient.
|
// StorageV1 retrieves the StorageV1Client
|
||||||
// Please explicitly pick a version.
|
func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
|
||||||
func (c *Clientset) Storage() v1beta1storage.StorageV1beta1Interface {
|
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return c.StorageV1beta1Client
|
return c.StorageV1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Storage retrieves the default version of StorageClient.
|
||||||
|
// Please explicitly pick a version.
|
||||||
|
func (c *Clientset) Storage() storagev1.StorageV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.StorageV1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discovery retrieves the DiscoveryClient
|
// Discovery retrieves the DiscoveryClient
|
||||||
@ -351,67 +379,75 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
}
|
}
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
var err error
|
var err error
|
||||||
cs.CoreV1Client, err = v1core.NewForConfig(&configShallowCopy)
|
cs.CoreV1Client, err = corev1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AppsV1beta1Client, err = v1beta1apps.NewForConfig(&configShallowCopy)
|
cs.AppsV1beta1Client, err = appsv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AuthenticationV1Client, err = v1authentication.NewForConfig(&configShallowCopy)
|
cs.AuthenticationV1Client, err = authenticationv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AuthenticationV1beta1Client, err = v1beta1authentication.NewForConfig(&configShallowCopy)
|
cs.AuthenticationV1beta1Client, err = authenticationv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AuthorizationV1Client, err = v1authorization.NewForConfig(&configShallowCopy)
|
cs.AuthorizationV1Client, err = authorizationv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AuthorizationV1beta1Client, err = v1beta1authorization.NewForConfig(&configShallowCopy)
|
cs.AuthorizationV1beta1Client, err = authorizationv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AutoscalingV1Client, err = v1autoscaling.NewForConfig(&configShallowCopy)
|
cs.AutoscalingV1Client, err = autoscalingv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.AutoscalingV2alpha1Client, err = v2alpha1autoscaling.NewForConfig(&configShallowCopy)
|
cs.AutoscalingV2alpha1Client, err = autoscalingv2alpha1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
|
cs.BatchV1Client, err = batchv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.BatchV2alpha1Client, err = v2alpha1batch.NewForConfig(&configShallowCopy)
|
cs.BatchV2alpha1Client, err = batchv2alpha1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.CertificatesV1beta1Client, err = v1beta1certificates.NewForConfig(&configShallowCopy)
|
cs.CertificatesV1beta1Client, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.ExtensionsV1beta1Client, err = v1beta1extensions.NewForConfig(&configShallowCopy)
|
cs.ExtensionsV1beta1Client, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.PolicyV1beta1Client, err = v1beta1policy.NewForConfig(&configShallowCopy)
|
cs.PolicyV1beta1Client, err = policyv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.RbacV1beta1Client, err = v1beta1rbac.NewForConfig(&configShallowCopy)
|
cs.RbacV1beta1Client, err = rbacv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.RbacV1alpha1Client, err = v1alpha1rbac.NewForConfig(&configShallowCopy)
|
cs.RbacV1alpha1Client, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.StorageV1beta1Client, err = v1beta1storage.NewForConfig(&configShallowCopy)
|
cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
cs.StorageV1Client, err = storagev1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -428,22 +464,24 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
// panics if there is an error in the config.
|
// panics if there is an error in the config.
|
||||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
cs.CoreV1Client = corev1.NewForConfigOrDie(c)
|
||||||
cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c)
|
cs.AppsV1beta1Client = appsv1beta1.NewForConfigOrDie(c)
|
||||||
cs.AuthenticationV1Client = v1authentication.NewForConfigOrDie(c)
|
cs.AuthenticationV1Client = authenticationv1.NewForConfigOrDie(c)
|
||||||
cs.AuthenticationV1beta1Client = v1beta1authentication.NewForConfigOrDie(c)
|
cs.AuthenticationV1beta1Client = authenticationv1beta1.NewForConfigOrDie(c)
|
||||||
cs.AuthorizationV1Client = v1authorization.NewForConfigOrDie(c)
|
cs.AuthorizationV1Client = authorizationv1.NewForConfigOrDie(c)
|
||||||
cs.AuthorizationV1beta1Client = v1beta1authorization.NewForConfigOrDie(c)
|
cs.AuthorizationV1beta1Client = authorizationv1beta1.NewForConfigOrDie(c)
|
||||||
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
|
cs.AutoscalingV1Client = autoscalingv1.NewForConfigOrDie(c)
|
||||||
cs.AutoscalingV2alpha1Client = v2alpha1autoscaling.NewForConfigOrDie(c)
|
cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.NewForConfigOrDie(c)
|
||||||
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
cs.BatchV1Client = batchv1.NewForConfigOrDie(c)
|
||||||
cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c)
|
cs.BatchV2alpha1Client = batchv2alpha1.NewForConfigOrDie(c)
|
||||||
cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c)
|
cs.CertificatesV1beta1Client = certificatesv1beta1.NewForConfigOrDie(c)
|
||||||
cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
|
cs.ExtensionsV1beta1Client = extensionsv1beta1.NewForConfigOrDie(c)
|
||||||
cs.PolicyV1beta1Client = v1beta1policy.NewForConfigOrDie(c)
|
cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
|
||||||
cs.RbacV1beta1Client = v1beta1rbac.NewForConfigOrDie(c)
|
cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
|
||||||
cs.RbacV1alpha1Client = v1alpha1rbac.NewForConfigOrDie(c)
|
cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
|
||||||
cs.StorageV1beta1Client = v1beta1storage.NewForConfigOrDie(c)
|
cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
|
||||||
|
cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)
|
||||||
|
cs.StorageV1Client = storagev1.NewForConfigOrDie(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
return &cs
|
return &cs
|
||||||
@ -452,22 +490,24 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
// New creates a new Clientset for the given RESTClient.
|
// New creates a new Clientset for the given RESTClient.
|
||||||
func New(c rest.Interface) *Clientset {
|
func New(c rest.Interface) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.New(c)
|
cs.CoreV1Client = corev1.New(c)
|
||||||
cs.AppsV1beta1Client = v1beta1apps.New(c)
|
cs.AppsV1beta1Client = appsv1beta1.New(c)
|
||||||
cs.AuthenticationV1Client = v1authentication.New(c)
|
cs.AuthenticationV1Client = authenticationv1.New(c)
|
||||||
cs.AuthenticationV1beta1Client = v1beta1authentication.New(c)
|
cs.AuthenticationV1beta1Client = authenticationv1beta1.New(c)
|
||||||
cs.AuthorizationV1Client = v1authorization.New(c)
|
cs.AuthorizationV1Client = authorizationv1.New(c)
|
||||||
cs.AuthorizationV1beta1Client = v1beta1authorization.New(c)
|
cs.AuthorizationV1beta1Client = authorizationv1beta1.New(c)
|
||||||
cs.AutoscalingV1Client = v1autoscaling.New(c)
|
cs.AutoscalingV1Client = autoscalingv1.New(c)
|
||||||
cs.AutoscalingV2alpha1Client = v2alpha1autoscaling.New(c)
|
cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.New(c)
|
||||||
cs.BatchV1Client = v1batch.New(c)
|
cs.BatchV1Client = batchv1.New(c)
|
||||||
cs.BatchV2alpha1Client = v2alpha1batch.New(c)
|
cs.BatchV2alpha1Client = batchv2alpha1.New(c)
|
||||||
cs.CertificatesV1beta1Client = v1beta1certificates.New(c)
|
cs.CertificatesV1beta1Client = certificatesv1beta1.New(c)
|
||||||
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
|
cs.ExtensionsV1beta1Client = extensionsv1beta1.New(c)
|
||||||
cs.PolicyV1beta1Client = v1beta1policy.New(c)
|
cs.PolicyV1beta1Client = policyv1beta1.New(c)
|
||||||
cs.RbacV1beta1Client = v1beta1rbac.New(c)
|
cs.RbacV1beta1Client = rbacv1beta1.New(c)
|
||||||
cs.RbacV1alpha1Client = v1alpha1rbac.New(c)
|
cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
|
||||||
cs.StorageV1beta1Client = v1beta1storage.New(c)
|
cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
|
||||||
|
cs.StorageV1beta1Client = storagev1beta1.New(c)
|
||||||
|
cs.StorageV1Client = storagev1.New(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
return &cs
|
return &cs
|
||||||
|
@ -22,39 +22,42 @@ import (
|
|||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
||||||
fakev1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
|
fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
|
||||||
v1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
||||||
fakev1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1/fake"
|
fakeauthenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1/fake"
|
||||||
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
||||||
fakev1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake"
|
fakeauthenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake"
|
||||||
v1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
||||||
fakev1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1/fake"
|
fakeauthorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1/fake"
|
||||||
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
||||||
fakev1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
|
fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
|
||||||
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
||||||
fakev1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
|
fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
|
||||||
v2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
||||||
fakev2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake"
|
fakeautoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake"
|
||||||
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||||
fakev1batch "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
||||||
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
||||||
fakev2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
|
fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
|
||||||
v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||||
fakev1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
|
fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
|
||||||
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
|
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
fakev1core "k8s.io/client-go/kubernetes/typed/core/v1/fake"
|
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
|
||||||
v1beta1extensions "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
fakev1beta1extensions "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
|
fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
|
||||||
v1beta1policy "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
||||||
fakev1beta1policy "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake"
|
fakepolicyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake"
|
||||||
v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
||||||
fakev1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
|
fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
|
||||||
v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
||||||
fakev1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
|
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
|
||||||
v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
|
||||||
fakev1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
|
fakesettingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake"
|
||||||
"k8s.io/client-go/pkg/api"
|
storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
|
||||||
|
fakestoragev1 "k8s.io/client-go/kubernetes/typed/storage/v1/fake"
|
||||||
|
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
||||||
|
fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
|
||||||
"k8s.io/client-go/testing"
|
"k8s.io/client-go/testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,7 +66,7 @@ import (
|
|||||||
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
// 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.
|
// for a real clientset and is mostly useful in simple unit tests.
|
||||||
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
o := testing.NewObjectTracker(api.Registry, api.Scheme, api.Codecs.UniversalDecoder())
|
o := testing.NewObjectTracker(registry, scheme, codecs.UniversalDecoder())
|
||||||
for _, obj := range objects {
|
for _, obj := range objects {
|
||||||
if err := o.Add(obj); err != nil {
|
if err := o.Add(obj); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@ -71,7 +74,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fakePtr := testing.Fake{}
|
fakePtr := testing.Fake{}
|
||||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o, api.Registry.RESTMapper()))
|
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o, registry.RESTMapper()))
|
||||||
|
|
||||||
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
||||||
|
|
||||||
@ -92,136 +95,151 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
|||||||
var _ kubernetes.Interface = &Clientset{}
|
var _ kubernetes.Interface = &Clientset{}
|
||||||
|
|
||||||
// CoreV1 retrieves the CoreV1Client
|
// CoreV1 retrieves the CoreV1Client
|
||||||
func (c *Clientset) CoreV1() v1core.CoreV1Interface {
|
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||||
return &fakev1core.FakeCoreV1{Fake: &c.Fake}
|
return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core retrieves the CoreV1Client
|
// Core retrieves the CoreV1Client
|
||||||
func (c *Clientset) Core() v1core.CoreV1Interface {
|
func (c *Clientset) Core() corev1.CoreV1Interface {
|
||||||
return &fakev1core.FakeCoreV1{Fake: &c.Fake}
|
return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppsV1beta1 retrieves the AppsV1beta1Client
|
// AppsV1beta1 retrieves the AppsV1beta1Client
|
||||||
func (c *Clientset) AppsV1beta1() v1beta1apps.AppsV1beta1Interface {
|
func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
|
||||||
return &fakev1beta1apps.FakeAppsV1beta1{Fake: &c.Fake}
|
return &fakeappsv1beta1.FakeAppsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apps retrieves the AppsV1beta1Client
|
// Apps retrieves the AppsV1beta1Client
|
||||||
func (c *Clientset) Apps() v1beta1apps.AppsV1beta1Interface {
|
func (c *Clientset) Apps() appsv1beta1.AppsV1beta1Interface {
|
||||||
return &fakev1beta1apps.FakeAppsV1beta1{Fake: &c.Fake}
|
return &fakeappsv1beta1.FakeAppsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthenticationV1 retrieves the AuthenticationV1Client
|
// AuthenticationV1 retrieves the AuthenticationV1Client
|
||||||
func (c *Clientset) AuthenticationV1() v1authentication.AuthenticationV1Interface {
|
func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
|
||||||
return &fakev1authentication.FakeAuthenticationV1{Fake: &c.Fake}
|
return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authentication retrieves the AuthenticationV1Client
|
// Authentication retrieves the AuthenticationV1Client
|
||||||
func (c *Clientset) Authentication() v1authentication.AuthenticationV1Interface {
|
func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
|
||||||
return &fakev1authentication.FakeAuthenticationV1{Fake: &c.Fake}
|
return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
||||||
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
|
||||||
return &fakev1beta1authentication.FakeAuthenticationV1beta1{Fake: &c.Fake}
|
return &fakeauthenticationv1beta1.FakeAuthenticationV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationV1 retrieves the AuthorizationV1Client
|
// AuthorizationV1 retrieves the AuthorizationV1Client
|
||||||
func (c *Clientset) AuthorizationV1() v1authorization.AuthorizationV1Interface {
|
func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
|
||||||
return &fakev1authorization.FakeAuthorizationV1{Fake: &c.Fake}
|
return &fakeauthorizationv1.FakeAuthorizationV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authorization retrieves the AuthorizationV1Client
|
// Authorization retrieves the AuthorizationV1Client
|
||||||
func (c *Clientset) Authorization() v1authorization.AuthorizationV1Interface {
|
func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
|
||||||
return &fakev1authorization.FakeAuthorizationV1{Fake: &c.Fake}
|
return &fakeauthorizationv1.FakeAuthorizationV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
||||||
func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface {
|
func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
|
||||||
return &fakev1beta1authorization.FakeAuthorizationV1beta1{Fake: &c.Fake}
|
return &fakeauthorizationv1beta1.FakeAuthorizationV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AutoscalingV1 retrieves the AutoscalingV1Client
|
// AutoscalingV1 retrieves the AutoscalingV1Client
|
||||||
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
|
||||||
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Autoscaling retrieves the AutoscalingV1Client
|
// Autoscaling retrieves the AutoscalingV1Client
|
||||||
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
|
||||||
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
||||||
func (c *Clientset) AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface {
|
func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface {
|
||||||
return &fakev2alpha1autoscaling.FakeAutoscalingV2alpha1{Fake: &c.Fake}
|
return &fakeautoscalingv2alpha1.FakeAutoscalingV2alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
|
||||||
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Batch retrieves the BatchV1Client
|
// Batch retrieves the BatchV1Client
|
||||||
func (c *Clientset) Batch() v1batch.BatchV1Interface {
|
func (c *Clientset) Batch() batchv1.BatchV1Interface {
|
||||||
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
||||||
func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface {
|
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
|
||||||
return &fakev2alpha1batch.FakeBatchV2alpha1{Fake: &c.Fake}
|
return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
||||||
func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface {
|
func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
|
||||||
return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake}
|
return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certificates retrieves the CertificatesV1beta1Client
|
// Certificates retrieves the CertificatesV1beta1Client
|
||||||
func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface {
|
func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
|
||||||
return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake}
|
return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
||||||
func (c *Clientset) ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface {
|
func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||||
return &fakev1beta1extensions.FakeExtensionsV1beta1{Fake: &c.Fake}
|
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extensions retrieves the ExtensionsV1beta1Client
|
// Extensions retrieves the ExtensionsV1beta1Client
|
||||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsV1beta1Interface {
|
func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
|
||||||
return &fakev1beta1extensions.FakeExtensionsV1beta1{Fake: &c.Fake}
|
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
||||||
func (c *Clientset) PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface {
|
func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
|
||||||
return &fakev1beta1policy.FakePolicyV1beta1{Fake: &c.Fake}
|
return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Policy retrieves the PolicyV1beta1Client
|
// Policy retrieves the PolicyV1beta1Client
|
||||||
func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface {
|
func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
|
||||||
return &fakev1beta1policy.FakePolicyV1beta1{Fake: &c.Fake}
|
return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RbacV1beta1 retrieves the RbacV1beta1Client
|
// RbacV1beta1 retrieves the RbacV1beta1Client
|
||||||
func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface {
|
func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
|
||||||
return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake}
|
return &fakerbacv1beta1.FakeRbacV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rbac retrieves the RbacV1beta1Client
|
// Rbac retrieves the RbacV1beta1Client
|
||||||
func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface {
|
func (c *Clientset) Rbac() rbacv1beta1.RbacV1beta1Interface {
|
||||||
return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake}
|
return &fakerbacv1beta1.FakeRbacV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
|
||||||
return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake}
|
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
|
||||||
|
func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
|
||||||
|
return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Settings retrieves the SettingsV1alpha1Client
|
||||||
|
func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
|
||||||
|
return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// StorageV1beta1 retrieves the StorageV1beta1Client
|
// StorageV1beta1 retrieves the StorageV1beta1Client
|
||||||
func (c *Clientset) StorageV1beta1() v1beta1storage.StorageV1beta1Interface {
|
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
|
||||||
return &fakev1beta1storage.FakeStorageV1beta1{Fake: &c.Fake}
|
return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Storage retrieves the StorageV1beta1Client
|
// StorageV1 retrieves the StorageV1Client
|
||||||
func (c *Clientset) Storage() v1beta1storage.StorageV1beta1Interface {
|
func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
|
||||||
return &fakev1beta1storage.FakeStorageV1beta1{Fake: &c.Fake}
|
return &fakestoragev1.FakeStorageV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Storage retrieves the StorageV1Client
|
||||||
|
func (c *Clientset) Storage() storagev1.StorageV1Interface {
|
||||||
|
return &fakestoragev1.FakeStorageV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
68
kubernetes/fake/register.go
Normal file
68
kubernetes/fake/register.go
Normal file
@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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"
|
||||||
|
core "k8s.io/client-go/pkg/api/install"
|
||||||
|
apps "k8s.io/client-go/pkg/apis/apps/install"
|
||||||
|
authentication "k8s.io/client-go/pkg/apis/authentication/install"
|
||||||
|
authorization "k8s.io/client-go/pkg/apis/authorization/install"
|
||||||
|
autoscaling "k8s.io/client-go/pkg/apis/autoscaling/install"
|
||||||
|
batch "k8s.io/client-go/pkg/apis/batch/install"
|
||||||
|
certificates "k8s.io/client-go/pkg/apis/certificates/install"
|
||||||
|
extensions "k8s.io/client-go/pkg/apis/extensions/install"
|
||||||
|
policy "k8s.io/client-go/pkg/apis/policy/install"
|
||||||
|
rbac "k8s.io/client-go/pkg/apis/rbac/install"
|
||||||
|
settings "k8s.io/client-go/pkg/apis/settings/install"
|
||||||
|
storage "k8s.io/client-go/pkg/apis/storage/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) {
|
||||||
|
core.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
apps.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
authentication.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
authorization.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
autoscaling.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
batch.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
certificates.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
extensions.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
policy.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
rbac.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
settings.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
storage.Install(groupFactoryRegistry, registry, scheme)
|
||||||
|
|
||||||
|
}
|
@ -31,6 +31,7 @@ import (
|
|||||||
_ "k8s.io/client-go/pkg/apis/extensions/install"
|
_ "k8s.io/client-go/pkg/apis/extensions/install"
|
||||||
_ "k8s.io/client-go/pkg/apis/policy/install"
|
_ "k8s.io/client-go/pkg/apis/policy/install"
|
||||||
_ "k8s.io/client-go/pkg/apis/rbac/install"
|
_ "k8s.io/client-go/pkg/apis/rbac/install"
|
||||||
|
_ "k8s.io/client-go/pkg/apis/settings/install"
|
||||||
_ "k8s.io/client-go/pkg/apis/storage/install"
|
_ "k8s.io/client-go/pkg/apis/storage/install"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2014 Google Inc. All rights reserved.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Package fuzz is a library for populating go objects with random values.
|
// This package is generated by client-gen with custom arguments.
|
||||||
package fuzz
|
|
||||||
|
// This package contains the scheme of the automatically generated clientset.
|
||||||
|
package scheme
|
87
kubernetes/scheme/register.go
Normal file
87
kubernetes/scheme/register.go
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
corev1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
|
authenticationv1 "k8s.io/client-go/pkg/apis/authentication/v1"
|
||||||
|
authenticationv1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1"
|
||||||
|
authorizationv1 "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
authorizationv1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1"
|
||||||
|
autoscalingv1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
||||||
|
autoscalingv2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
||||||
|
batchv1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||||
|
batchv2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
|
certificatesv1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
||||||
|
extensionsv1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
policyv1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
|
rbacv1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
rbacv1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
settingsv1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
storagev1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
|
storagev1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
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) {
|
||||||
|
corev1.AddToScheme(scheme)
|
||||||
|
appsv1beta1.AddToScheme(scheme)
|
||||||
|
authenticationv1.AddToScheme(scheme)
|
||||||
|
authenticationv1beta1.AddToScheme(scheme)
|
||||||
|
authorizationv1.AddToScheme(scheme)
|
||||||
|
authorizationv1beta1.AddToScheme(scheme)
|
||||||
|
autoscalingv1.AddToScheme(scheme)
|
||||||
|
autoscalingv2alpha1.AddToScheme(scheme)
|
||||||
|
batchv1.AddToScheme(scheme)
|
||||||
|
batchv2alpha1.AddToScheme(scheme)
|
||||||
|
certificatesv1beta1.AddToScheme(scheme)
|
||||||
|
extensionsv1beta1.AddToScheme(scheme)
|
||||||
|
policyv1beta1.AddToScheme(scheme)
|
||||||
|
rbacv1beta1.AddToScheme(scheme)
|
||||||
|
rbacv1alpha1.AddToScheme(scheme)
|
||||||
|
settingsv1alpha1.AddToScheme(scheme)
|
||||||
|
storagev1beta1.AddToScheme(scheme)
|
||||||
|
storagev1.AddToScheme(scheme)
|
||||||
|
|
||||||
|
}
|
@ -17,15 +17,16 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AppsV1beta1Interface interface {
|
type AppsV1beta1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
|
DeploymentsGetter
|
||||||
|
ScalesGetter
|
||||||
StatefulSetsGetter
|
StatefulSetsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +35,14 @@ type AppsV1beta1Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *AppsV1beta1Client) Deployments(namespace string) DeploymentInterface {
|
||||||
|
return newDeployments(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AppsV1beta1Client) Scales(namespace string) ScaleInterface {
|
||||||
|
return newScales(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
|
func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
|
||||||
return newStatefulSets(c, namespace)
|
return newStatefulSets(c, namespace)
|
||||||
}
|
}
|
||||||
@ -67,22 +76,14 @@ func New(c rest.Interface) *AppsV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("apps/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if apps/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("apps/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
172
kubernetes/typed/apps/v1beta1/deployment.go
Normal file
172
kubernetes/typed/apps/v1beta1/deployment.go
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type DeploymentsGetter interface {
|
||||||
|
Deployments(namespace string) DeploymentInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeploymentInterface has methods to work with Deployment resources.
|
||||||
|
type DeploymentInterface interface {
|
||||||
|
Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
|
||||||
|
Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
|
||||||
|
UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
|
||||||
|
List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
|
||||||
|
DeploymentExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// deployments implements DeploymentInterface
|
||||||
|
type deployments struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newDeployments returns a Deployments
|
||||||
|
func newDeployments(c *AppsV1beta1Client, namespace string) *deployments {
|
||||||
|
return &deployments{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||||
|
func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||||
|
result = &v1beta1.Deployment{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
Body(deployment).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||||
|
func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||||
|
result = &v1beta1.Deployment{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
Name(deployment.Name).
|
||||||
|
Body(deployment).
|
||||||
|
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 *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||||
|
result = &v1beta1.Deployment{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
Name(deployment.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(deployment).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
|
||||||
|
func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
|
||||||
|
result = &v1beta1.Deployment{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||||
|
func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||||
|
result = &v1beta1.DeploymentList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested deployments.
|
||||||
|
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched deployment.
|
||||||
|
func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
|
||||||
|
result = &v1beta1.Deployment{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("deployments").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -26,6 +26,14 @@ type FakeAppsV1beta1 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeAppsV1beta1) Deployments(namespace string) v1beta1.DeploymentInterface {
|
||||||
|
return &FakeDeployments{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAppsV1beta1) Scales(namespace string) v1beta1.ScaleInterface {
|
||||||
|
return &FakeScales{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInterface {
|
func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInterface {
|
||||||
return &FakeStatefulSets{c, namespace}
|
return &FakeStatefulSets{c, namespace}
|
||||||
}
|
}
|
||||||
|
128
kubernetes/typed/apps/v1beta1/fake/fake_deployment.go
Normal file
128
kubernetes/typed/apps/v1beta1/fake/fake_deployment.go
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeDeployments implements DeploymentInterface
|
||||||
|
type FakeDeployments struct {
|
||||||
|
Fake *FakeAppsV1beta1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta1", Resource: "deployments"}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.Deployment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.Deployment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.Deployment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.Deployment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1beta1.DeploymentList{}
|
||||||
|
for _, item := range obj.(*v1beta1.DeploymentList).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 deployments.
|
||||||
|
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched deployment.
|
||||||
|
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.Deployment), err
|
||||||
|
}
|
@ -14,7 +14,10 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file was autogenerated by set-gen. Do not edit it manually!
|
package fake
|
||||||
|
|
||||||
// Package sets has auto-generated set types.
|
// FakeScales implements ScaleInterface
|
||||||
package sets
|
type FakeScales struct {
|
||||||
|
Fake *FakeAppsV1beta1
|
||||||
|
ns string
|
||||||
|
}
|
@ -16,4 +16,8 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
|
type DeploymentExpansion interface{}
|
||||||
|
|
||||||
|
type ScaleExpansion interface{}
|
||||||
|
|
||||||
type StatefulSetExpansion interface{}
|
type StatefulSetExpansion interface{}
|
||||||
|
46
kubernetes/typed/apps/v1beta1/scale.go
Normal file
46
kubernetes/typed/apps/v1beta1/scale.go
Normal file
@ -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 v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ScalesGetter has a method to return a ScaleInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type ScalesGetter interface {
|
||||||
|
Scales(namespace string) ScaleInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// ScaleInterface has methods to work with Scale resources.
|
||||||
|
type ScaleInterface interface {
|
||||||
|
ScaleExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// scales implements ScaleInterface
|
||||||
|
type scales struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newScales returns a Scales
|
||||||
|
func newScales(c *AppsV1beta1Client, namespace string) *scales {
|
||||||
|
return &scales{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested statefulSets.
|
// Watch returns a watch.Interface that watches the requested statefulSets.
|
||||||
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/authentication/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *AuthenticationV1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1")
|
gv := v1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if authentication.k8s.io/v1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("authentication.k8s.io/v1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *AuthenticationV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if authentication.k8s.io/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("authentication.k8s.io/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -77,22 +76,14 @@ func New(c rest.Interface) *AuthorizationV1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1")
|
gv := v1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if authorization.k8s.io/v1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("authorization.k8s.io/v1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -77,22 +76,14 @@ func New(c rest.Interface) *AuthorizationV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if authorization.k8s.io/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("authorization.k8s.io/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *AutoscalingV1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("autoscaling/v1")
|
gv := v1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if autoscaling/v1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("autoscaling/v1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptio
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions)
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||||
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v2alpha1
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *AutoscalingV2alpha1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("autoscaling/v2alpha1")
|
gv := v2alpha1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if autoscaling/v2alpha1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("autoscaling/v2alpha1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.H
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.H
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||||
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("horizontalpodautoscalers").
|
Resource("horizontalpodautoscalers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *BatchV1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("batch/v1")
|
gv := v1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if batch/v1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("batch/v1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested jobs.
|
// Watch returns a watch.Interface that watches the requested jobs.
|
||||||
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("jobs").
|
Resource("jobs").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,17 +17,15 @@ limitations under the License.
|
|||||||
package v2alpha1
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BatchV2alpha1Interface interface {
|
type BatchV2alpha1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
CronJobsGetter
|
CronJobsGetter
|
||||||
JobsGetter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1Client is used to interact with features provided by the batch group.
|
// BatchV2alpha1Client is used to interact with features provided by the batch group.
|
||||||
@ -39,10 +37,6 @@ func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
|
|||||||
return newCronJobs(c, namespace)
|
return newCronJobs(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface {
|
|
||||||
return newJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
||||||
func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
|
func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
@ -72,22 +66,14 @@ func New(c rest.Interface) *BatchV2alpha1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("batch/v2alpha1")
|
gv := v2alpha1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if batch/v2alpha1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("batch/v2alpha1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Cro
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested cronJobs.
|
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||||
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,10 +30,6 @@ func (c *FakeBatchV2alpha1) CronJobs(namespace string) v2alpha1.CronJobInterface
|
|||||||
return &FakeCronJobs{c, namespace}
|
return &FakeCronJobs{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface {
|
|
||||||
return &FakeJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeBatchV2alpha1) RESTClient() rest.Interface {
|
func (c *FakeBatchV2alpha1) RESTClient() rest.Interface {
|
||||||
|
@ -1,128 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
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"
|
|
||||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeJobs implements JobInterface
|
|
||||||
type FakeJobs struct {
|
|
||||||
Fake *FakeBatchV2alpha1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v2alpha1", Resource: "jobs"}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Create(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Update(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) UpdateStatus(job *v2alpha1.Job) (*v2alpha1.Job, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2alpha1.JobList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.Job), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeJobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v2alpha1.JobList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v2alpha1.JobList{}
|
|
||||||
for _, item := range obj.(*v2alpha1.JobList).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 jobs.
|
|
||||||
func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched job.
|
|
||||||
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v2alpha1.Job{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.Job), err
|
|
||||||
}
|
|
@ -17,5 +17,3 @@ limitations under the License.
|
|||||||
package v2alpha1
|
package v2alpha1
|
||||||
|
|
||||||
type CronJobExpansion interface{}
|
type CronJobExpansion interface{}
|
||||||
|
|
||||||
type JobExpansion interface{}
|
|
||||||
|
@ -1,172 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
api "k8s.io/client-go/pkg/api"
|
|
||||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
// JobsGetter has a method to return a JobInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type JobsGetter interface {
|
|
||||||
Jobs(namespace string) JobInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// JobInterface has methods to work with Job resources.
|
|
||||||
type JobInterface interface {
|
|
||||||
Create(*v2alpha1.Job) (*v2alpha1.Job, error)
|
|
||||||
Update(*v2alpha1.Job) (*v2alpha1.Job, error)
|
|
||||||
UpdateStatus(*v2alpha1.Job) (*v2alpha1.Job, error)
|
|
||||||
Delete(name string, options *v1.DeleteOptions) error
|
|
||||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
|
||||||
Get(name string, options v1.GetOptions) (*v2alpha1.Job, error)
|
|
||||||
List(opts v1.ListOptions) (*v2alpha1.JobList, error)
|
|
||||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error)
|
|
||||||
JobExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// jobs implements JobInterface
|
|
||||||
type jobs struct {
|
|
||||||
client rest.Interface
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
// newJobs returns a Jobs
|
|
||||||
func newJobs(c *BatchV2alpha1Client, namespace string) *jobs {
|
|
||||||
return &jobs{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
ns: namespace,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
|
||||||
func (c *jobs) Create(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
|
|
||||||
result = &v2alpha1.Job{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
Body(job).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
|
||||||
func (c *jobs) Update(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
|
|
||||||
result = &v2alpha1.Job{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
Name(job.Name).
|
|
||||||
Body(job).
|
|
||||||
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 *jobs) UpdateStatus(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
|
|
||||||
result = &v2alpha1.Job{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
Name(job.Name).
|
|
||||||
SubResource("status").
|
|
||||||
Body(job).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the job and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *jobs) Delete(name string, options *v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
Name(name).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
|
||||||
func (c *jobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
|
||||||
result = &v2alpha1.Job{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
|
||||||
func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
|
||||||
result = &v2alpha1.JobList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested jobs.
|
|
||||||
func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.client.Get().
|
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched job.
|
|
||||||
func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
|
||||||
result = &v2alpha1.Job{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("jobs").
|
|
||||||
SubResource(subresources...).
|
|
||||||
Name(name).
|
|
||||||
Body(data).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *CertificatesV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if certificates.k8s.io/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("certificates.k8s.io/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -109,7 +109,7 @@ func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptio
|
|||||||
func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("certificatesigningrequests").
|
Resource("certificatesigningrequests").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -121,7 +121,7 @@ func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (re
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("certificatesigningrequests").
|
Resource("certificatesigningrequests").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,7 +132,7 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.
|
|||||||
result = &v1beta1.CertificateSigningRequestList{}
|
result = &v1beta1.CertificateSigningRequestList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("certificatesigningrequests").
|
Resource("certificatesigningrequests").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -140,10 +140,10 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
|
// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
|
||||||
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("certificatesigningrequests").
|
Resource("certificatesigningrequests").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions)
|
|||||||
func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("componentstatuses").
|
Resource("componentstatuses").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("componentstatuses").
|
Resource("componentstatuses").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component
|
|||||||
result = &v1.ComponentStatusList{}
|
result = &v1.ComponentStatusList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("componentstatuses").
|
Resource("componentstatuses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||||
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("componentstatuses").
|
Resource("componentstatuses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOption
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("configmaps").
|
Resource("configmaps").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("configmaps").
|
Resource("configmaps").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("configmaps").
|
Resource("configmaps").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||||
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("configmaps").
|
Resource("configmaps").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -142,22 +141,14 @@ func New(c rest.Interface) *CoreV1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("/v1")
|
gv := v1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if /v1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("/v1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/api"
|
config.APIPath = "/api"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("endpoints").
|
Resource("endpoints").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.End
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("endpoints").
|
Resource("endpoints").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("endpoints").
|
Resource("endpoints").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||||
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("endpoints").
|
Resource("endpoints").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions me
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("events").
|
Resource("events").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event,
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("events").
|
Resource("events").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("events").
|
Resource("events").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested events.
|
// Watch returns a watch.Interface that watches the requested events.
|
||||||
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("events").
|
Resource("events").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptio
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("limitranges").
|
Resource("limitranges").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.L
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("limitranges").
|
Resource("limitranges").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList,
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("limitranges").
|
Resource("limitranges").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList,
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||||
func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("limitranges").
|
Resource("limitranges").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -109,7 +109,7 @@ func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|||||||
func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("namespaces").
|
Resource("namespaces").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -121,7 +121,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("namespaces").
|
Resource("namespaces").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,7 +132,7 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e
|
|||||||
result = &v1.NamespaceList{}
|
result = &v1.NamespaceList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("namespaces").
|
Resource("namespaces").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -140,10 +140,10 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||||
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("namespaces").
|
Resource("namespaces").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -109,7 +109,7 @@ func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|||||||
func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("nodes").
|
Resource("nodes").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -121,7 +121,7 @@ func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, e
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("nodes").
|
Resource("nodes").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,7 +132,7 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error)
|
|||||||
result = &v1.NodeList{}
|
result = &v1.NodeList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("nodes").
|
Resource("nodes").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -140,10 +140,10 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error)
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested nodes.
|
// Watch returns a watch.Interface that watches the requested nodes.
|
||||||
func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("nodes").
|
Resource("nodes").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -109,7 +109,7 @@ func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions)
|
|||||||
func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("persistentvolumes").
|
Resource("persistentvolumes").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -121,7 +121,7 @@ func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("persistentvolumes").
|
Resource("persistentvolumes").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,7 +132,7 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten
|
|||||||
result = &v1.PersistentVolumeList{}
|
result = &v1.PersistentVolumeList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("persistentvolumes").
|
Resource("persistentvolumes").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -140,10 +140,10 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
||||||
func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("persistentvolumes").
|
Resource("persistentvolumes").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("persistentvolumeclaims").
|
Resource("persistentvolumeclaims").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (r
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("persistentvolumeclaims").
|
Resource("persistentvolumeclaims").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("persistentvolumeclaims").
|
Resource("persistentvolumeclaims").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
|
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
|
||||||
func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("persistentvolumeclaims").
|
Resource("persistentvolumeclaims").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("pods").
|
Resource("pods").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("pods").
|
Resource("pods").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("pods").
|
Resource("pods").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested pods.
|
// Watch returns a watch.Interface that watches the requested pods.
|
||||||
func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("pods").
|
Resource("pods").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOpti
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("podtemplates").
|
Resource("podtemplates").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("podtemplates").
|
Resource("podtemplates").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("podtemplates").
|
Resource("podtemplates").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested podTemplates.
|
// Watch returns a watch.Interface that watches the requested podTemplates.
|
||||||
func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("podtemplates").
|
Resource("podtemplates").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicationcontrollers").
|
Resource("replicationcontrollers").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (r
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicationcontrollers").
|
Resource("replicationcontrollers").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicationcontrollers").
|
Resource("replicationcontrollers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested replicationControllers.
|
// Watch returns a watch.Interface that watches the requested replicationControllers.
|
||||||
func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicationcontrollers").
|
Resource("replicationcontrollers").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOp
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("resourcequotas").
|
Resource("resourcequotas").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("resourcequotas").
|
Resource("resourcequotas").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("resourcequotas").
|
Resource("resourcequotas").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested resourceQuotas.
|
// Watch returns a watch.Interface that watches the requested resourceQuotas.
|
||||||
func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("resourcequotas").
|
Resource("resourcequotas").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions m
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("secrets").
|
Resource("secrets").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("secrets").
|
Resource("secrets").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("secrets").
|
Resource("secrets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested secrets.
|
// Watch returns a watch.Interface that watches the requested secrets.
|
||||||
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("secrets").
|
Resource("secrets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("services").
|
Resource("services").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("services").
|
Resource("services").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("services").
|
Resource("services").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested services.
|
// Watch returns a watch.Interface that watches the requested services.
|
||||||
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("services").
|
Resource("services").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@ type ServiceExpansion interface {
|
|||||||
// ProxyGet returns a response of the service by calling it through the proxy.
|
// ProxyGet returns a response of the service by calling it through the proxy.
|
||||||
func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
|
func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
|
||||||
request := c.client.Get().
|
request := c.client.Get().
|
||||||
Prefix("proxy").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("services").
|
Resource("services").
|
||||||
|
SubResource("proxy").
|
||||||
Name(net.JoinSchemeNamePort(scheme, name, port)).
|
Name(net.JoinSchemeNamePort(scheme, name, port)).
|
||||||
Suffix(path)
|
Suffix(path)
|
||||||
for k, v := range params {
|
for k, v := range params {
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1 "k8s.io/client-go/pkg/api/v1"
|
v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listO
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("serviceaccounts").
|
Resource("serviceaccounts").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("serviceaccounts").
|
Resource("serviceaccounts").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("serviceaccounts").
|
Resource("serviceaccounts").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested serviceAccounts.
|
// Watch returns a watch.Interface that watches the requested serviceAccounts.
|
||||||
func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("serviceaccounts").
|
Resource("serviceaccounts").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("daemonsets").
|
Resource("daemonsets").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.Da
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("daemonsets").
|
Resource("daemonsets").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("daemonsets").
|
Resource("daemonsets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||||
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("daemonsets").
|
Resource("daemonsets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.D
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested deployments.
|
// Watch returns a watch.Interface that watches the requested deployments.
|
||||||
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -97,22 +96,14 @@ func New(c rest.Interface) *ExtensionsV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("extensions/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if extensions/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("extensions/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("ingresses").
|
Resource("ingresses").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ing
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("ingresses").
|
Resource("ingresses").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("ingresses").
|
Resource("ingresses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested ingresses.
|
// Watch returns a watch.Interface that watches the requested ingresses.
|
||||||
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("ingresses").
|
Resource("ingresses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) err
|
|||||||
func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("podsecuritypolicies").
|
Resource("podsecuritypolicies").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("podsecuritypolicies").
|
Resource("podsecuritypolicies").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu
|
|||||||
result = &v1beta1.PodSecurityPolicyList{}
|
result = &v1beta1.PodSecurityPolicyList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("podsecuritypolicies").
|
Resource("podsecuritypolicies").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
|
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
|
||||||
func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("podsecuritypolicies").
|
Resource("podsecuritypolicies").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.R
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||||
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) err
|
|||||||
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("thirdpartyresources").
|
Resource("thirdpartyresources").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("thirdpartyresources").
|
Resource("thirdpartyresources").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPa
|
|||||||
result = &v1beta1.ThirdPartyResourceList{}
|
result = &v1beta1.ThirdPartyResourceList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("thirdpartyresources").
|
Resource("thirdpartyresources").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPa
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||||
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("thirdpartyresources").
|
Resource("thirdpartyresources").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listO
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("poddisruptionbudgets").
|
Resource("poddisruptionbudgets").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -129,7 +129,7 @@ func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("poddisruptionbudgets").
|
Resource("poddisruptionbudgets").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -141,7 +141,7 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("poddisruptionbudgets").
|
Resource("poddisruptionbudgets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -149,11 +149,11 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
|
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
|
||||||
func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("poddisruptionbudgets").
|
Resource("poddisruptionbudgets").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,22 +71,14 @@ func New(c rest.Interface) *PolicyV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("policy/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if policy/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("policy/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
|
|||||||
func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi
|
|||||||
result = &v1alpha1.ClusterRoleList{}
|
result = &v1alpha1.ClusterRoleList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested clusterRoles.
|
// Watch returns a watch.Interface that watches the requested clusterRoles.
|
||||||
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) err
|
|||||||
func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste
|
|||||||
result = &v1alpha1.ClusterRoleBindingList{}
|
result = &v1alpha1.ClusterRoleBindingList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
|
// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
|
||||||
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,22 +81,14 @@ func New(c rest.Interface) *RbacV1alpha1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1alpha1")
|
gv := v1alpha1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if rbac.authorization.k8s.io/v1alpha1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("rbac.authorization.k8s.io/v1alpha1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role,
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error)
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error)
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested roles.
|
// Watch returns a watch.Interface that watches the requested roles.
|
||||||
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested roleBindings.
|
// Watch returns a watch.Interface that watches the requested roleBindings.
|
||||||
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
|
|||||||
func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis
|
|||||||
result = &v1beta1.ClusterRoleList{}
|
result = &v1beta1.ClusterRoleList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested clusterRoles.
|
// Watch returns a watch.Interface that watches the requested clusterRoles.
|
||||||
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("clusterroles").
|
Resource("clusterroles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) err
|
|||||||
func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster
|
|||||||
result = &v1beta1.ClusterRoleBindingList{}
|
result = &v1beta1.ClusterRoleBindingList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
|
// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
|
||||||
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("clusterrolebindings").
|
Resource("clusterrolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,22 +81,14 @@ func New(c rest.Interface) *RbacV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if rbac.authorization.k8s.io/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("rbac.authorization.k8s.io/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, e
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error)
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error)
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested roles.
|
// Watch returns a watch.Interface that watches the requested roles.
|
||||||
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("roles").
|
Resource("roles").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -112,7 +112,7 @@ func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.
|
|||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,7 +124,7 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -132,11 +132,11 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested roleBindings.
|
// Watch returns a watch.Interface that watches the requested roleBindings.
|
||||||
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("rolebindings").
|
Resource("rolebindings").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
kubernetes/typed/settings/v1alpha1/doc.go
Normal file
20
kubernetes/typed/settings/v1alpha1/doc.go
Normal file
@ -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
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Package meta provides functions for retrieving API metadata from objects
|
// This package is generated by client-gen with custom arguments.
|
||||||
// belonging to the Kubernetes API
|
|
||||||
package meta
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
118
kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go
Normal file
118
kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakePodPresets implements PodPresetInterface
|
||||||
|
type FakePodPresets struct {
|
||||||
|
Fake *FakeSettingsV1alpha1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", Version: "v1alpha1", Resource: "podpresets"}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodPreset), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodPreset), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha1.PodPresetList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodPreset), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(podpresetsResource, c.ns, opts), &v1alpha1.PodPresetList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha1.PodPresetList{}
|
||||||
|
for _, item := range obj.(*v1alpha1.PodPresetList).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 podPresets.
|
||||||
|
func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podPreset.
|
||||||
|
func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, data, subresources...), &v1alpha1.PodPreset{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodPreset), err
|
||||||
|
}
|
@ -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 (
|
||||||
|
v1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeSettingsV1alpha1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeSettingsV1alpha1) PodPresets(namespace string) v1alpha1.PodPresetInterface {
|
||||||
|
return &FakePodPresets{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeSettingsV1alpha1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
19
kubernetes/typed/settings/v1alpha1/generated_expansion.go
Normal file
19
kubernetes/typed/settings/v1alpha1/generated_expansion.go
Normal file
@ -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 PodPresetExpansion interface{}
|
155
kubernetes/typed/settings/v1alpha1/podpreset.go
Normal file
155
kubernetes/typed/settings/v1alpha1/podpreset.go
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodPresetsGetter has a method to return a PodPresetInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type PodPresetsGetter interface {
|
||||||
|
PodPresets(namespace string) PodPresetInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodPresetInterface has methods to work with PodPreset resources.
|
||||||
|
type PodPresetInterface interface {
|
||||||
|
Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
|
||||||
|
Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
|
||||||
|
List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
|
||||||
|
PodPresetExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// podPresets implements PodPresetInterface
|
||||||
|
type podPresets struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newPodPresets returns a PodPresets
|
||||||
|
func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
|
||||||
|
return &podPresets{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
|
||||||
|
func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
result = &v1alpha1.PodPreset{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
Body(podPreset).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
|
||||||
|
func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
result = &v1alpha1.PodPreset{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
Name(podPreset.Name).
|
||||||
|
Body(podPreset).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
|
||||||
|
func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
result = &v1alpha1.PodPreset{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
|
||||||
|
func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
|
||||||
|
result = &v1alpha1.PodPresetList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested podPresets.
|
||||||
|
func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podPreset.
|
||||||
|
func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
|
||||||
|
result = &v1alpha1.PodPreset{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podpresets").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
88
kubernetes/typed/settings/v1alpha1/settings_client.go
Normal file
88
kubernetes/typed/settings/v1alpha1/settings_client.go
Normal file
@ -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"
|
||||||
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SettingsV1alpha1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
PodPresetsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
|
||||||
|
type SettingsV1alpha1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
|
||||||
|
return newPodPresets(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new SettingsV1alpha1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &SettingsV1alpha1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new SettingsV1alpha1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *SettingsV1alpha1Client {
|
||||||
|
return &SettingsV1alpha1Client{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 *SettingsV1alpha1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -14,9 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=package
|
// This package is generated by client-gen with custom arguments.
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
|
|
||||||
// +groupName=meta.k8s.io
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
20
kubernetes/typed/storage/v1/fake/doc.go
Normal file
20
kubernetes/typed/storage/v1/fake/doc.go
Normal file
@ -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
|
@ -14,10 +14,25 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file was autogenerated by set-gen. Do not edit it manually!
|
package fake
|
||||||
|
|
||||||
package sets
|
import (
|
||||||
|
v1 "k8s.io/client-go/kubernetes/typed/storage/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// Empty is public since it is used by some internal API objects for conversions between external
|
type FakeStorageV1 struct {
|
||||||
// string arrays and internal sets, and conversion logic requires public types today.
|
*testing.Fake
|
||||||
type Empty struct{}
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageV1) StorageClasses() v1.StorageClassInterface {
|
||||||
|
return &FakeStorageClasses{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeStorageV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
110
kubernetes/typed/storage/v1/fake/fake_storageclass.go
Normal file
110
kubernetes/typed/storage/v1/fake/fake_storageclass.go
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeStorageClasses implements StorageClassInterface
|
||||||
|
type FakeStorageClasses struct {
|
||||||
|
Fake *FakeStorageV1
|
||||||
|
}
|
||||||
|
|
||||||
|
var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "storageclasses"}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &v1.StorageClass{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.StorageClass), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1.StorageClass{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.StorageClass), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &v1.StorageClass{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1.StorageClassList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(storageclassesResource, name), &v1.StorageClass{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.StorageClass), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeStorageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(storageclassesResource, opts), &v1.StorageClassList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1.StorageClassList{}
|
||||||
|
for _, item := range obj.(*v1.StorageClassList).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 storageClasses.
|
||||||
|
func (c *FakeStorageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched storageClass.
|
||||||
|
func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &v1.StorageClass{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.StorageClass), err
|
||||||
|
}
|
19
kubernetes/typed/storage/v1/generated_expansion.go
Normal file
19
kubernetes/typed/storage/v1/generated_expansion.go
Normal file
@ -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 v1
|
||||||
|
|
||||||
|
type StorageClassExpansion interface{}
|
88
kubernetes/typed/storage/v1/storage_client.go
Normal file
88
kubernetes/typed/storage/v1/storage_client.go
Normal file
@ -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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type StorageV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
StorageClassesGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageV1Client is used to interact with features provided by the storage.k8s.io group.
|
||||||
|
type StorageV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *StorageV1Client) StorageClasses() StorageClassInterface {
|
||||||
|
return newStorageClasses(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new StorageV1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*StorageV1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &StorageV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new StorageV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *StorageV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new StorageV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *StorageV1Client {
|
||||||
|
return &StorageV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1.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 *StorageV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
145
kubernetes/typed/storage/v1/storageclass.go
Normal file
145
kubernetes/typed/storage/v1/storageclass.go
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/storage/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StorageClassesGetter has a method to return a StorageClassInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type StorageClassesGetter interface {
|
||||||
|
StorageClasses() StorageClassInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageClassInterface has methods to work with StorageClass resources.
|
||||||
|
type StorageClassInterface interface {
|
||||||
|
Create(*v1.StorageClass) (*v1.StorageClass, error)
|
||||||
|
Update(*v1.StorageClass) (*v1.StorageClass, error)
|
||||||
|
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||||
|
Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error)
|
||||||
|
List(opts meta_v1.ListOptions) (*v1.StorageClassList, error)
|
||||||
|
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error)
|
||||||
|
StorageClassExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// storageClasses implements StorageClassInterface
|
||||||
|
type storageClasses struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newStorageClasses returns a StorageClasses
|
||||||
|
func newStorageClasses(c *StorageV1Client) *storageClasses {
|
||||||
|
return &storageClasses{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
|
||||||
|
func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
|
||||||
|
result = &v1.StorageClass{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("storageclasses").
|
||||||
|
Body(storageClass).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
|
||||||
|
func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
|
||||||
|
result = &v1.StorageClass{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("storageclasses").
|
||||||
|
Name(storageClass.Name).
|
||||||
|
Body(storageClass).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("storageclasses").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("storageclasses").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
|
||||||
|
func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
|
||||||
|
result = &v1.StorageClass{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("storageclasses").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
|
||||||
|
func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
|
||||||
|
result = &v1.StorageClassList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("storageclasses").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested storageClasses.
|
||||||
|
func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Resource("storageclasses").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched storageClass.
|
||||||
|
func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) {
|
||||||
|
result = &v1.StorageClass{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Resource("storageclasses").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
api "k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,22 +66,14 @@ func New(c rest.Interface) *StorageV1beta1Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv, err := schema.ParseGroupVersion("storage.k8s.io/v1beta1")
|
gv := v1beta1.SchemeGroupVersion
|
||||||
if err != nil {
|
config.GroupVersion = &gv
|
||||||
return err
|
|
||||||
}
|
|
||||||
// if storage.k8s.io/v1beta1 is not enabled, return an error
|
|
||||||
if !api.Registry.IsEnabledVersion(gv) {
|
|
||||||
return fmt.Errorf("storage.k8s.io/v1beta1 is not enabled")
|
|
||||||
}
|
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
if config.UserAgent == "" {
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
copyGroupVersion := gv
|
|
||||||
config.GroupVersion = ©GroupVersion
|
|
||||||
|
|
||||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
api "k8s.io/client-go/pkg/api"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error {
|
|||||||
func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Resource("storageclasses").
|
Resource("storageclasses").
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
Body(options).
|
Body(options).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -105,7 +105,7 @@ func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta
|
|||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("storageclasses").
|
Resource("storageclasses").
|
||||||
Name(name).
|
Name(name).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -116,7 +116,7 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass
|
|||||||
result = &v1beta1.StorageClassList{}
|
result = &v1beta1.StorageClassList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("storageclasses").
|
Resource("storageclasses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
@ -124,10 +124,10 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass
|
|||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested storageClasses.
|
// Watch returns a watch.Interface that watches the requested storageClasses.
|
||||||
func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
|
||||||
Resource("storageclasses").
|
Resource("storageclasses").
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user