mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-25 03:04:26 +00:00
Compare commits
66 Commits
kubernetes
...
kubernetes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1957ffeb3d | ||
|
|
b044414c7d | ||
|
|
ccd2429093 | ||
|
|
8a8517e82f | ||
|
|
1c2a06d4c0 | ||
|
|
8a28689b29 | ||
|
|
da710ccb08 | ||
|
|
ce9bf2bd6c | ||
|
|
807bb8875b | ||
|
|
ced3412595 | ||
|
|
01f7f3801f | ||
|
|
f5d6749301 | ||
|
|
d8b352f6b2 | ||
|
|
e9556070fb | ||
|
|
5fecd3df89 | ||
|
|
f031b2af14 | ||
|
|
b1fb949a8b | ||
|
|
dde6ef6eaf | ||
|
|
271600dc67 | ||
|
|
c9d1119131 | ||
|
|
69fbc9fa3c | ||
|
|
7e9fc247fe | ||
|
|
109fef42a8 | ||
|
|
e36946081f | ||
|
|
8331bec30f | ||
|
|
21ab0aa61a | ||
|
|
1b825e3a78 | ||
|
|
bd935b15f7 | ||
|
|
18ec62fe90 | ||
|
|
ad1ee6bff2 | ||
|
|
6829d13c43 | ||
|
|
7e03948729 | ||
|
|
62b2cb756b | ||
|
|
f855fad41e | ||
|
|
d79b7d1f8b | ||
|
|
c96a48875f | ||
|
|
95954ff384 | ||
|
|
de090a6a8d | ||
|
|
2a98de87d5 | ||
|
|
34ead21345 | ||
|
|
af8ed43b01 | ||
|
|
b7e986aa58 | ||
|
|
7316584978 | ||
|
|
0926299490 | ||
|
|
d6f5cef499 | ||
|
|
a4971b3c17 | ||
|
|
f4d24c8a47 | ||
|
|
4170dc586c | ||
|
|
6cddcf6b00 | ||
|
|
17dfc25798 | ||
|
|
37ead7f166 | ||
|
|
99b02d3434 | ||
|
|
77f9dfa073 | ||
|
|
8788745821 | ||
|
|
246626c8d5 | ||
|
|
b06ac967c7 | ||
|
|
5e9d18c77c | ||
|
|
88b5d2a76a | ||
|
|
f17d6594e8 | ||
|
|
b7af4c11d3 | ||
|
|
fe985a55a2 | ||
|
|
60b0546760 | ||
|
|
370f3b346b | ||
|
|
832b09bf1b | ||
|
|
723afcf620 | ||
|
|
1e45615a5e |
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,4 +1,2 @@
|
||||
Sorry, client-go does not accept changes via pull requests at this time. Please
|
||||
submit your pull request to the main repository:
|
||||
https://github.com/kubernetes/kubernetes. See the guidance here:
|
||||
https://github.com/kubernetes/client-go#contributing-code.
|
||||
Sorry, we do not accept changes directly against this repository. Please see
|
||||
CONTRIBUTING.md for information on where and how to contribute instead.
|
||||
|
||||
105
CHANGELOG.md
105
CHANGELOG.md
@@ -2,6 +2,111 @@ TODO: This document was manually maintained so might be incomplete. The
|
||||
automation effort is tracked in
|
||||
https://github.com/kubernetes/client-go/issues/234.
|
||||
|
||||
Changes in `k8s.io/api` and `k8s.io/apimachinery` are mentioned here
|
||||
because `k8s.io/client-go` depends on them.
|
||||
|
||||
# v6.0.0
|
||||
|
||||
**Breaking Changes:**
|
||||
|
||||
* If you upgrade your client-go libs and use the `AppsV1() or Apps()` interface, please note that the default garbage collection behavior is changed.
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/55148](https://github.com/kubernetes/kubernetes/pull/55148)
|
||||
|
||||
* Swagger 1.2 retriever `DiscoveryClient.SwaggerSchema` was removed from the discovery client
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53441](https://github.com/kubernetes/kubernetes/pull/53441)
|
||||
|
||||
* Informers got a NewFilteredSharedInformerFactory to e.g. filter by namespace
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54660](https://github.com/kubernetes/kubernetes/pull/54660)
|
||||
|
||||
* [k8s.io/api] The dynamic admission webhook is split into two kinds, mutating and validating.
|
||||
The kinds have changed completely and old code must be ported to `admissionregistration.k8s.io/v1beta1` -
|
||||
`MutatingWebhookConfiguration` and `ValidatingWebhookConfiguration`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/55282](https://github.com/kubernetes/kubernetes/pull/55282)
|
||||
|
||||
* [k8s.io/api] Renamed `core/v1.ScaleIOVolumeSource` to `ScaleIOPersistentVolumeSource`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54013](https://github.com/kubernetes/kubernetes/pull/54013)
|
||||
|
||||
* [k8s.io/api] Renamed `core/v1.RBDVolumeSource` to `RBDPersistentVolumeSource`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54302](https://github.com/kubernetes/kubernetes/pull/54302)
|
||||
|
||||
* [k8s.io/api] Removed `core/v1.CreatedByAnnotation`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54445](https://github.com/kubernetes/kubernetes/pull/54445)
|
||||
|
||||
* [k8s.io/api] Renamed `core/v1.StorageMediumHugepages` to `StorageMediumHugePages`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54748](https://github.com/kubernetes/kubernetes/pull/54748)
|
||||
|
||||
* [k8s.io/api] `core/v1.Taint.TimeAdded` became a pointer
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/43016](https://github.com/kubernetes/kubernetes/pull/43016)
|
||||
|
||||
* [k8s.io/api] `core/v1.DefaultHardPodAffinitySymmetricWeight` type changed from int to int32
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53850](https://github.com/kubernetes/kubernetes/pull/53850)
|
||||
|
||||
* [k8s.io/apimachinery] `ObjectCopier` interface was removed (requires switch to new generators with DeepCopy methods)
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53525](https://github.com/kubernetes/kubernetes/pull/53525)
|
||||
|
||||
**New Features:**
|
||||
|
||||
* Certificate manager was moved from kubelet to `k8s.io/client-go/util/certificates`
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/49654](https://github.com/kubernetes/kubernetes/pull/49654)
|
||||
|
||||
* [k8s.io/api] Workloads api types are promoted to `apps/v1` version
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53679](https://github.com/kubernetes/kubernetes/pull/53679)
|
||||
|
||||
* [k8s.io/api] Added `storage.k8s.io/v1alpha1` API group
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54463](https://github.com/kubernetes/kubernetes/pull/54463)
|
||||
|
||||
* [k8s.io/api] Added support for conditions in StatefulSet status
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/55268](https://github.com/kubernetes/kubernetes/pull/55268)
|
||||
|
||||
* [k8s.io/api] Added support for conditions in DaemonSet status
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/55272](https://github.com/kubernetes/kubernetes/pull/55272)
|
||||
|
||||
* [k8s.io/apimachinery] Added polymorphic scale client in `k8s.io/client-go/scale`, which supports scaling of resources in arbitrary API groups
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53743](https://github.com/kubernetes/kubernetes/pull/53743)
|
||||
|
||||
* [k8s.io/apimachinery] `meta.MetadataAccessor` got API chunking support
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53768](https://github.com/kubernetes/kubernetes/pull/53768)
|
||||
|
||||
* [k8s.io/apimachinery] `unstructured.Unstructured` got getters and setters
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/51940](https://github.com/kubernetes/kubernetes/pull/51940)
|
||||
|
||||
**Bug fixes and Improvements:**
|
||||
|
||||
* The body in glog output is not truncated with log level 10
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/54801](https://github.com/kubernetes/kubernetes/pull/54801)
|
||||
|
||||
* [k8s.io/api] Unset `creationTimestamp` field is output as null if encoded from an unstructured object
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53464](https://github.com/kubernetes/kubernetes/pull/53464)
|
||||
|
||||
* [k8s.io/apimachinery] Redirect behavior is restored for proxy subresources
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/52933](https://github.com/kubernetes/kubernetes/pull/52933)
|
||||
|
||||
* [k8s.io/apimachinery] Random string generation functions are optimized
|
||||
|
||||
* [https://github.com/kubernetes/kubernetes/pull/53720](https://github.com/kubernetes/kubernetes/pull/53720)
|
||||
|
||||
# v5.0.1
|
||||
|
||||
Bug fix: picked up a security fix [kubernetes/kubernetes#53443](https://github.com/kubernetes/kubernetes/pull/53443) for `PodSecurityPolicy`.
|
||||
|
||||
7
CONTRIBUTING.md
Normal file
7
CONTRIBUTING.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Contributing guidelines
|
||||
|
||||
Do not open pull requests directly against this repository, they will be ignored. Instead, please open pull requests against [kuberentes/kubernetes](https://git.k8s.io/kubernetes/). Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md) you would follow for any other pull request made to kubernetes/kubernetes.
|
||||
|
||||
This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/client-go](https://git.k8s.io/kubernetes/staging/src/k8s.io/client-go) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot).
|
||||
|
||||
Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information
|
||||
276
Godeps/Godeps.json
generated
276
Godeps/Godeps.json
generated
@@ -30,14 +30,6 @@
|
||||
"ImportPath": "github.com/Azure/go-autorest/autorest/date",
|
||||
"Rev": "e14a70c556c8e0db173358d1a903dca345a8e75e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/PuerkitoBio/purell",
|
||||
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/PuerkitoBio/urlesc",
|
||||
"Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/coreos/go-oidc/http",
|
||||
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
|
||||
@@ -86,34 +78,10 @@
|
||||
"ImportPath": "github.com/docker/spdystream/spdy",
|
||||
"Rev": "449fdfce4d962303d702fec724ef0ad181c92528"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/emicklei/go-restful",
|
||||
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/emicklei/go-restful/log",
|
||||
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ghodss/yaml",
|
||||
"Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/jsonpointer",
|
||||
"Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/jsonreference",
|
||||
"Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/spec",
|
||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-openapi/swag",
|
||||
"Rev": "f3f9494671f93fcff853e3c6e9e948b3eb71e590"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
|
||||
@@ -150,10 +118,6 @@
|
||||
"ImportPath": "github.com/golang/protobuf/ptypes/timestamp",
|
||||
"Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/google/btree",
|
||||
"Rev": "7d79101e329e5a3adf994758c578dab82b90c017"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/google/gofuzz",
|
||||
"Rev": "44d81051d367757e1c7c6a5a86423ece9afcf63c"
|
||||
@@ -172,39 +136,31 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
||||
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gregjones/httpcache",
|
||||
"Rev": "787624de3eb7bd915c329cba748687a3b22666a6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gregjones/httpcache/diskcache",
|
||||
"Rev": "787624de3eb7bd915c329cba748687a3b22666a6"
|
||||
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/golang-lru",
|
||||
@@ -228,35 +184,19 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/json-iterator/go",
|
||||
"Rev": "36b14963da70d11297d313183d7e6388c8510e1e"
|
||||
"Rev": "13f86432b882000a51c6e610c620974462691a97"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/juju/ratelimit",
|
||||
"Rev": "5b9ff866471762aa2ab2dced63c9fb6f53921342"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/buffer",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/jlexer",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mailru/easyjson/jwriter",
|
||||
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/peterbourgon/diskv",
|
||||
"Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/pmezard/go-difflib/difflib",
|
||||
"Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/pflag",
|
||||
"Rev": "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
|
||||
"Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/stretchr/testify/assert",
|
||||
@@ -318,34 +258,10 @@
|
||||
"ImportPath": "golang.org/x/sys/windows",
|
||||
"Rev": "95c6576299259db960f6c5b9b69ea52422860fce"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/cases",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/internal",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/internal/tag",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/language",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/runes",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/secure/bidirule",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/secure/precis",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/transform",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
@@ -358,10 +274,6 @@
|
||||
"ImportPath": "golang.org/x/text/unicode/norm",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/width",
|
||||
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/inf.v0",
|
||||
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
|
||||
@@ -372,339 +284,335 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta2",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v2alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/certificates/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/networking/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/policy/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/settings/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1alpha1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1beta1",
|
||||
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
|
||||
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
|
||||
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
|
||||
"Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ To install `client-go` and place its dependencies in your `$GOPATH`:
|
||||
```sh
|
||||
go get k8s.io/client-go/...
|
||||
cd $GOPATH/src/k8s.io/client-go
|
||||
git checkout v2.0.0
|
||||
git checkout v6.0.0
|
||||
# cd 1.5 # only necessary with 1.5 and 1.4 clients.
|
||||
godep restore ./...
|
||||
```
|
||||
@@ -99,7 +99,7 @@ your project:
|
||||
package: ( your project's import path ) # e.g. github.com/foo/bar
|
||||
import:
|
||||
- package: k8s.io/client-go
|
||||
version: v2.0.0
|
||||
version: v6.0.0
|
||||
```
|
||||
|
||||
Second, add a Go file that imports `client-go` somewhere in your project,
|
||||
@@ -132,7 +132,7 @@ requests can override the version manually in `glide.yaml`. For example:
|
||||
package: ( your project's import path ) # e.g. github.com/foo/bar
|
||||
import:
|
||||
- package: k8s.io/client-go
|
||||
version: v2.0.0
|
||||
version: v6.0.0
|
||||
# Use a newer version of go-spew even though client-go wants an old one.
|
||||
- package: github.com/davecgh/go-spew
|
||||
version: v1.1.0
|
||||
|
||||
42
README.md
42
README.md
@@ -2,12 +2,22 @@
|
||||
|
||||
Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster.
|
||||
|
||||
We currently recommend using the v4.0.0 tag. See [INSTALL.md](/INSTALL.md) for
|
||||
We currently recommend using the v6.0.0 tag. See [INSTALL.md](/INSTALL.md) for
|
||||
detailed installation instructions. `go get k8s.io/client-go/...` works, but
|
||||
will give you head and doesn't handle the dependencies well.
|
||||
|
||||
[](https://travis-ci.org/kubernetes/client-go)
|
||||
[](https://godoc.org/k8s.io/client-go)
|
||||
[![BuildStatus Widget]][BuildStatus Result]
|
||||
[![GoReport Widget]][GoReport Status]
|
||||
[![GoDocWidget]][GoDocReference]
|
||||
|
||||
[BuildStatus Result]: https://travis-ci.org/kubernetes/client-go
|
||||
[BuildStatus Widget]: https://travis-ci.org/kubernetes/client-go.svg?branch=master
|
||||
|
||||
[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes/client-go
|
||||
[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes/client-go
|
||||
|
||||
[GoDocWidget]: https://godoc.org/k8s.io/client-go?status.svg
|
||||
[GoDocReference]:https://godoc.org/k8s.io/client-go
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -17,7 +27,7 @@ will give you head and doesn't handle the dependencies well.
|
||||
- [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters)
|
||||
- [Compatibility matrix](#compatibility-matrix)
|
||||
- [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version)
|
||||
- [Kuberentes tags](#kubernetes-tags)
|
||||
- [Kubernetes tags](#kubernetes-tags)
|
||||
- [How to get it](#how-to-get-it)
|
||||
- [How to use it](#how-to-use-it)
|
||||
- [Dependency management](#dependency-management)
|
||||
@@ -81,15 +91,16 @@ We will backport bugfixes--but not new features--into older versions of
|
||||
|
||||
#### Compatibility matrix
|
||||
|
||||
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 |
|
||||
|---------------------|----------------|----------------|----------------|----------------|----------------|
|
||||
| client-go 1.4 | ✓ | - | - | - | - |
|
||||
| client-go 1.5 | + | - | - | - | - |
|
||||
| client-go 2.0 | +- | ✓ | +- | +- | +- |
|
||||
| client-go 3.0 | +- | +- | ✓ | - | +- |
|
||||
| client-go 4.0 | +- | +- | +- | ✓ | +- |
|
||||
| client-go 5.0 | +- | +- | +- | +- | ✓ |
|
||||
| client-go HEAD | +- | +- | +- | +- | + |
|
||||
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 |
|
||||
|---------------------|----------------|----------------|----------------|----------------|----------------|----------------|
|
||||
| client-go 1.4 | ✓ | - | - | - | - | - |
|
||||
| client-go 1.5 | + | - | - | - | - | - |
|
||||
| client-go 2.0 | +- | ✓ | +- | +- | +- | +- |
|
||||
| client-go 3.0 | +- | +- | ✓ | - | +- | +- |
|
||||
| client-go 4.0 | +- | +- | +- | ✓ | +- | +- |
|
||||
| client-go 5.0 | +- | +- | +- | +- | ✓ | +- |
|
||||
| client-go 6.0 | +- | +- | +- | +- | +- | ✓ |
|
||||
| client-go HEAD | +- | +- | +- | +- | +- | + |
|
||||
|
||||
Key:
|
||||
|
||||
@@ -112,10 +123,11 @@ between client-go versions.
|
||||
|----------------|--------------------------------------|-------------------------------|
|
||||
| client-go 1.4 | Kubernetes main repo, 1.4 branch | = - |
|
||||
| client-go 1.5 | Kubernetes main repo, 1.5 branch | = - |
|
||||
| client-go 2.0 | Kubernetes main repo, 1.5 branch | ✓ |
|
||||
| client-go 3.0 | Kubernetes main repo, 1.6 branch | ✓ |
|
||||
| client-go 2.0 | Kubernetes main repo, 1.5 branch | = - |
|
||||
| client-go 3.0 | Kubernetes main repo, 1.6 branch | = - |
|
||||
| client-go 4.0 | Kubernetes main repo, 1.7 branch | ✓ |
|
||||
| client-go 5.0 | Kubernetes main repo, 1.8 branch | ✓ |
|
||||
| client-go 6.0 | Kubernetes main repo, 1.9 branch | ✓ |
|
||||
| client-go HEAD | Kubernetes main repo, master branch | ✓ |
|
||||
|
||||
Key:
|
||||
|
||||
3
code-of-conduct.md
Normal file
3
code-of-conduct.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Kubernetes Community Code of Conduct
|
||||
|
||||
Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md)
|
||||
@@ -9,8 +9,8 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["memcache_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/discovery/cached",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",
|
||||
|
||||
@@ -395,15 +395,6 @@ func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
|
||||
return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
|
||||
}
|
||||
|
||||
func stringDoesntExistIn(str string, slice []string) bool {
|
||||
for _, s := range slice {
|
||||
if s == str {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *DiscoveryClient) RESTClient() restclient.Interface {
|
||||
|
||||
@@ -12,8 +12,8 @@ go_test(
|
||||
"client_test.go",
|
||||
"dynamic_util_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/dynamic",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",
|
||||
|
||||
@@ -8,8 +8,8 @@ load(
|
||||
|
||||
go_binary(
|
||||
name = "create-update-delete-deployment",
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/examples/create-update-delete-deployment",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -8,8 +8,8 @@ load(
|
||||
|
||||
go_binary(
|
||||
name = "in-cluster-client-configuration",
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/examples/in-cluster-client-configuration",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -8,8 +8,8 @@ load(
|
||||
|
||||
go_binary(
|
||||
name = "out-of-cluster-client-configuration",
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/examples/out-of-cluster-client-configuration",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -62,15 +62,18 @@ func main() {
|
||||
// Examples for error handling:
|
||||
// - Use helper functions like e.g. errors.IsNotFound()
|
||||
// - And/or cast to StatusError and use its properties like e.g. ErrStatus.Message
|
||||
_, err = clientset.CoreV1().Pods("default").Get("example-xxxxx", metav1.GetOptions{})
|
||||
namespace := "default"
|
||||
pod := "example-xxxxx"
|
||||
_, err = clientset.CoreV1().Pods(namespace).Get(pod, metav1.GetOptions{})
|
||||
if errors.IsNotFound(err) {
|
||||
fmt.Printf("Pod not found\n")
|
||||
fmt.Printf("Pod %s in namespace %s not found\n", pod, namespace)
|
||||
} else if statusError, isStatus := err.(*errors.StatusError); isStatus {
|
||||
fmt.Printf("Error getting pod %v\n", statusError.ErrStatus.Message)
|
||||
fmt.Printf("Error getting pod %s in namespace %s: %v\n",
|
||||
pod, namespace, statusError.ErrStatus.Message)
|
||||
} else if err != nil {
|
||||
panic(err.Error())
|
||||
} else {
|
||||
fmt.Printf("Found pod\n")
|
||||
fmt.Printf("Found pod %s in namespace %s\n", pod, namespace)
|
||||
}
|
||||
|
||||
time.Sleep(10 * time.Second)
|
||||
|
||||
@@ -8,8 +8,8 @@ load(
|
||||
|
||||
go_binary(
|
||||
name = "workqueue",
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/examples/workqueue",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// InitializerConfigurationInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1 "k8s.io/api/apps/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/apps/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ControllerRevisionInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1 "k8s.io/api/apps/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/apps/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DaemonSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1 "k8s.io/api/apps/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/apps/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DeploymentInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1 "k8s.io/api/apps/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/apps/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ReplicaSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1 "k8s.io/api/apps/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/apps/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// StatefulSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta1 "k8s.io/api/apps/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ControllerRevisionInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta1 "k8s.io/api/apps/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DeploymentInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta1 "k8s.io/api/apps/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// StatefulSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ControllerRevisionInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DaemonSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DeploymentInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ReplicaSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// StatefulSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
autoscaling_v1 "k8s.io/api/autoscaling/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/autoscaling/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
batch_v1 "k8s.io/api/batch/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/batch/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// JobInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
batch_v1beta1 "k8s.io/api/batch/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/batch/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// CronJobInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
batch_v2alpha1 "k8s.io/api/batch/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// CronJobInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// CertificateSigningRequestInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ComponentStatusInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ConfigMapInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// EndpointsInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// EventInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// LimitRangeInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// NamespaceInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// NodeInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PersistentVolumeInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PersistentVolumeClaimInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PodInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PodTemplateInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ReplicationControllerInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ResourceQuotaInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// SecretInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ServiceInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/core/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ServiceAccountInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
events_v1beta1 "k8s.io/api/events/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/events/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// EventInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DaemonSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// DeploymentInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// IngressInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PodSecurityPolicyInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ReplicaSetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,10 @@ limitations under the License.
|
||||
package informers
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -39,9 +43,6 @@ import (
|
||||
storage "k8s.io/client-go/informers/storage"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
time "time"
|
||||
)
|
||||
|
||||
type sharedInformerFactory struct {
|
||||
|
||||
@@ -20,6 +20,7 @@ package informers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
||||
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
v1 "k8s.io/api/apps/v1"
|
||||
|
||||
@@ -19,11 +19,12 @@ limitations under the License.
|
||||
package internalinterfaces
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networking_v1 "k8s.io/api/networking/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/networking/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// NetworkPolicyInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
policy_v1beta1 "k8s.io/api/policy/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/policy/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PodDisruptionBudgetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/rbac/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/rbac/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/rbac/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/rbac/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ClusterRoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// RoleBindingInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PriorityClassInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
settings_v1alpha1 "k8s.io/api/settings/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// PodPresetInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storage_v1 "k8s.io/api/storage/v1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/storage/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// StorageClassInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storage_v1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/storage/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// VolumeAttachmentInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
storage_v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -27,7 +29,6 @@ import (
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// StorageClassInformer provides access to a shared informer and lister for
|
||||
|
||||
@@ -95,7 +95,15 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
|
||||
fakePtr := testing.Fake{}
|
||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
||||
fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
return true, watch, nil
|
||||
})
|
||||
|
||||
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
|
||||
}
|
||||
|
||||
@@ -103,5 +103,4 @@ func AddToScheme(scheme *runtime.Scheme) {
|
||||
storagev1beta1.AddToScheme(scheme)
|
||||
storagev1.AddToScheme(scheme)
|
||||
storagev1alpha1.AddToScheme(scheme)
|
||||
|
||||
}
|
||||
|
||||
@@ -103,5 +103,4 @@ func AddToScheme(scheme *runtime.Scheme) {
|
||||
storagev1beta1.AddToScheme(scheme)
|
||||
storagev1.AddToScheme(scheme)
|
||||
storagev1alpha1.AddToScheme(scheme)
|
||||
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ go_library(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["daemonset_expansion_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/listers/extensions/v1beta1",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||
|
||||
@@ -9,8 +9,8 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["azure_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/plugin/pkg/client/auth/azure",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library"],
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["gcp_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/plugin/pkg/client/auth/gcp",
|
||||
library = ":go_default_library",
|
||||
deps = ["//vendor/golang.org/x/oauth2:go_default_library"],
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["oidc_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/plugin/pkg/client/auth/oidc",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -9,8 +9,8 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["openstack_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/plugin/pkg/client/auth/openstack",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
|
||||
@@ -16,8 +16,8 @@ go_test(
|
||||
"url_utils_test.go",
|
||||
"urlbackoff_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/rest",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/github.com/google/gofuzz:go_default_library",
|
||||
|
||||
@@ -71,10 +71,6 @@ type Config struct {
|
||||
// TODO: demonstrate an OAuth2 compatible client.
|
||||
BearerToken string
|
||||
|
||||
// CacheDir is the directory where we'll store HTTP cached responses.
|
||||
// If set to empty string, no caching mechanism will be used.
|
||||
CacheDir string
|
||||
|
||||
// Impersonate is the configuration that RESTClient will use for impersonation.
|
||||
Impersonate ImpersonationConfig
|
||||
|
||||
@@ -434,7 +430,6 @@ func CopyConfig(config *Config) *Config {
|
||||
Username: config.Username,
|
||||
Password: config.Password,
|
||||
BearerToken: config.BearerToken,
|
||||
CacheDir: config.CacheDir,
|
||||
Impersonate: ImpersonationConfig{
|
||||
Groups: config.Impersonate.Groups,
|
||||
Extra: config.Impersonate.Extra,
|
||||
|
||||
@@ -267,7 +267,6 @@ func TestAnonymousConfig(t *testing.T) {
|
||||
expected.BearerToken = ""
|
||||
expected.Username = ""
|
||||
expected.Password = ""
|
||||
expected.CacheDir = ""
|
||||
expected.AuthProvider = nil
|
||||
expected.AuthConfigPersister = nil
|
||||
expected.TLSClientConfig.CertData = nil
|
||||
|
||||
@@ -89,7 +89,6 @@ func (c *Config) TransportConfig() (*transport.Config, error) {
|
||||
},
|
||||
Username: c.Username,
|
||||
Password: c.Password,
|
||||
CacheDir: c.CacheDir,
|
||||
BearerToken: c.BearerToken,
|
||||
Impersonate: transport.ImpersonationConfig{
|
||||
UserName: c.Impersonate.UserName,
|
||||
|
||||
@@ -35,8 +35,8 @@ go_test(
|
||||
"client_test.go",
|
||||
"roundtrip_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/scale",
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/github.com/stretchr/testify/assert:go_default_library",
|
||||
"//vendor/k8s.io/api/apps/v1beta1:go_default_library",
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
autoscaling "k8s.io/api/autoscaling/v1"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/dynamic"
|
||||
@@ -129,21 +130,29 @@ func (c *namespacedScaleClient) Get(resource schema.GroupResource, name string)
|
||||
return nil, fmt.Errorf("unable to get client for %s: %v", resource.String(), err)
|
||||
}
|
||||
|
||||
rawObj, err := c.client.clientBase.Get().
|
||||
result := c.client.clientBase.Get().
|
||||
AbsPath(path).
|
||||
Namespace(c.namespace).
|
||||
Resource(gvr.Resource).
|
||||
Name(name).
|
||||
SubResource("scale").
|
||||
Do().
|
||||
Get()
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, fmt.Errorf("could not fetch the scale for %s %s: %v", resource.String(), name, err)
|
||||
}
|
||||
|
||||
scaleBytes, err := result.Raw()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
decoder := scaleConverter.codecs.UniversalDecoder(scaleConverter.ScaleVersions()...)
|
||||
rawScaleObj, err := runtime.Decode(decoder, scaleBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// convert whatever this is to autoscaling/v1.Scale
|
||||
scaleObj, err := scaleConverter.ConvertToVersion(rawObj, autoscaling.SchemeGroupVersion)
|
||||
scaleObj, err := scaleConverter.ConvertToVersion(rawScaleObj, autoscaling.SchemeGroupVersion)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("received an object from a /scale endpoint which was not convertible to autoscaling Scale: %v", err)
|
||||
}
|
||||
@@ -158,7 +167,7 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut
|
||||
}
|
||||
|
||||
// Currently, a /scale endpoint can receive and return different scale types.
|
||||
// Until we hvae support for the alternative API representations proposal,
|
||||
// Until we have support for the alternative API representations proposal,
|
||||
// we need to deal with sending and accepting differnet API versions.
|
||||
|
||||
// figure out what scale we actually need here
|
||||
@@ -170,25 +179,38 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut
|
||||
// convert this to whatever this endpoint wants
|
||||
scaleUpdate, err := scaleConverter.ConvertToVersion(scale, desiredGVK.GroupVersion())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not convert scale update to internal Scale: %v", err)
|
||||
return nil, fmt.Errorf("could not convert scale update to external Scale: %v", err)
|
||||
}
|
||||
encoder := scaleConverter.codecs.LegacyCodec(desiredGVK.GroupVersion())
|
||||
scaleUpdateBytes, err := runtime.Encode(encoder, scaleUpdate)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not encode scale update to external Scale: %v", err)
|
||||
}
|
||||
|
||||
rawObj, err := c.client.clientBase.Put().
|
||||
result := c.client.clientBase.Put().
|
||||
AbsPath(path).
|
||||
Namespace(c.namespace).
|
||||
Resource(gvr.Resource).
|
||||
Name(scale.Name).
|
||||
SubResource("scale").
|
||||
Body(scaleUpdate).
|
||||
Do().
|
||||
Get()
|
||||
Body(scaleUpdateBytes).
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, fmt.Errorf("could not update the scale for %s %s: %v", resource.String(), scale.Name, err)
|
||||
}
|
||||
|
||||
scaleBytes, err := result.Raw()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not fetch the scale for %s %s: %v", resource.String(), scale.Name, err)
|
||||
return nil, err
|
||||
}
|
||||
decoder := scaleConverter.codecs.UniversalDecoder(scaleConverter.ScaleVersions()...)
|
||||
rawScaleObj, err := runtime.Decode(decoder, scaleBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// convert whatever this is back to autoscaling/v1.Scale
|
||||
scaleObj, err := scaleConverter.ConvertToVersion(rawObj, autoscaling.SchemeGroupVersion)
|
||||
scaleObj, err := scaleConverter.ConvertToVersion(rawScaleObj, autoscaling.SchemeGroupVersion)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("received an object from a /scale endpoint which was not convertible to autoscaling Scale: %v", err)
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/discovery"
|
||||
scalescheme "k8s.io/client-go/scale/scheme"
|
||||
scaleappsint "k8s.io/client-go/scale/scheme/appsint"
|
||||
@@ -124,6 +125,7 @@ func NewDiscoveryScaleKindResolver(client discovery.ServerResourcesInterface) Sc
|
||||
// ScaleConverter knows how to convert between external scale versions.
|
||||
type ScaleConverter struct {
|
||||
scheme *runtime.Scheme
|
||||
codecs serializer.CodecFactory
|
||||
internalVersioner runtime.GroupVersioner
|
||||
}
|
||||
|
||||
@@ -141,6 +143,7 @@ func NewScaleConverter() *ScaleConverter {
|
||||
|
||||
return &ScaleConverter{
|
||||
scheme: scheme,
|
||||
codecs: serializer.NewCodecFactory(scheme),
|
||||
internalVersioner: runtime.NewMultiGroupVersioner(
|
||||
scalescheme.SchemeGroupVersion,
|
||||
schema.GroupKind{Group: scaleext.GroupName, Kind: "Scale"},
|
||||
@@ -156,6 +159,22 @@ func (c *ScaleConverter) Scheme() *runtime.Scheme {
|
||||
return c.scheme
|
||||
}
|
||||
|
||||
func (c *ScaleConverter) Codecs() serializer.CodecFactory {
|
||||
return c.codecs
|
||||
}
|
||||
|
||||
func (c *ScaleConverter) ScaleVersions() []schema.GroupVersion {
|
||||
return []schema.GroupVersion{
|
||||
scaleautoscaling.SchemeGroupVersion,
|
||||
scalescheme.SchemeGroupVersion,
|
||||
scaleext.SchemeGroupVersion,
|
||||
scaleextint.SchemeGroupVersion,
|
||||
scaleappsint.SchemeGroupVersion,
|
||||
scaleappsv1beta1.SchemeGroupVersion,
|
||||
scaleappsv1beta2.SchemeGroupVersion,
|
||||
}
|
||||
}
|
||||
|
||||
// ConvertToVersion converts the given *external* input object to the given output *external* output group-version.
|
||||
func (c *ScaleConverter) ConvertToVersion(in runtime.Object, outVersion schema.GroupVersion) (runtime.Object, error) {
|
||||
scaleInt, err := c.scheme.ConvertToVersion(in, c.internalVersioner)
|
||||
|
||||
@@ -3,6 +3,7 @@ package(default_visibility = ["//visibility:public"])
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_library(
|
||||
@@ -28,6 +29,24 @@ go_library(
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = [
|
||||
"fixture_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
importpath = "k8s.io/client-go/testing",
|
||||
deps = [
|
||||
"//vendor/github.com/stretchr/testify/assert:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
|
||||
@@ -29,6 +29,11 @@ import (
|
||||
restclient "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// FakeWatchBufferSize is the max num of watch event can be buffered in the
|
||||
// watch channel. Note that when watch event overflows or exceed this buffer
|
||||
// size, manipulations via fake client may be blocked.
|
||||
const FakeWatchBufferSize = 128
|
||||
|
||||
// ObjectTracker keeps track of objects. It is intended to be used to
|
||||
// fake calls to a server by returning objects based on their kind,
|
||||
// namespace and name.
|
||||
@@ -54,6 +59,10 @@ type ObjectTracker interface {
|
||||
// didn't exist in the tracker prior to deletion, Delete returns
|
||||
// no error.
|
||||
Delete(gvr schema.GroupVersionResource, ns, name string) error
|
||||
|
||||
// Watch watches objects from the tracker. Watch returns a channel
|
||||
// which will push added / modified / deleted object.
|
||||
Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// ObjectScheme abstracts the implementation of common operations on objects.
|
||||
@@ -132,6 +141,13 @@ type tracker struct {
|
||||
decoder runtime.Decoder
|
||||
lock sync.RWMutex
|
||||
objects map[schema.GroupVersionResource][]runtime.Object
|
||||
// The value type of watchers is a map of which the key is either a namespace or
|
||||
// all/non namespace aka "" and its value is list of fake watchers. Each of
|
||||
// fake watcher holds a buffered channel of size "FakeWatchBufferSize" which
|
||||
// is default to 128. Manipulations on resources will broadcast the notification
|
||||
// events into the watchers' channel and note that too many unhandled event may
|
||||
// potentially block the tracker.
|
||||
watchers map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher
|
||||
}
|
||||
|
||||
var _ ObjectTracker = &tracker{}
|
||||
@@ -140,9 +156,10 @@ var _ ObjectTracker = &tracker{}
|
||||
// of objects for the fake clientset. Mostly useful for unit tests.
|
||||
func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracker {
|
||||
return &tracker{
|
||||
scheme: scheme,
|
||||
decoder: decoder,
|
||||
objects: make(map[schema.GroupVersionResource][]runtime.Object),
|
||||
scheme: scheme,
|
||||
decoder: decoder,
|
||||
objects: make(map[schema.GroupVersionResource][]runtime.Object),
|
||||
watchers: make(map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +202,19 @@ func (t *tracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionK
|
||||
return list.DeepCopyObject(), nil
|
||||
}
|
||||
|
||||
func (t *tracker) Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
|
||||
fakewatcher := watch.NewFakeWithChanSize(FakeWatchBufferSize, true)
|
||||
|
||||
if _, exists := t.watchers[gvr]; !exists {
|
||||
t.watchers[gvr] = make(map[string][]*watch.FakeWatcher)
|
||||
}
|
||||
t.watchers[gvr][ns] = append(t.watchers[gvr][ns], fakewatcher)
|
||||
return fakewatcher, nil
|
||||
}
|
||||
|
||||
func (t *tracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error) {
|
||||
errNotFound := errors.NewNotFound(gvr.GroupResource(), name)
|
||||
|
||||
@@ -263,6 +293,19 @@ func (t *tracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns
|
||||
return t.add(gvr, obj, ns, true)
|
||||
}
|
||||
|
||||
func (t *tracker) getWatches(gvr schema.GroupVersionResource, ns string) []*watch.FakeWatcher {
|
||||
watches := []*watch.FakeWatcher{}
|
||||
if t.watchers[gvr] != nil {
|
||||
if w := t.watchers[gvr][ns]; w != nil {
|
||||
watches = append(watches, w...)
|
||||
}
|
||||
if w := t.watchers[gvr][""]; w != nil {
|
||||
watches = append(watches, w...)
|
||||
}
|
||||
}
|
||||
return watches
|
||||
}
|
||||
|
||||
func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns string, replaceExisting bool) error {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
@@ -296,6 +339,9 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st
|
||||
}
|
||||
if oldMeta.GetNamespace() == newMeta.GetNamespace() && oldMeta.GetName() == newMeta.GetName() {
|
||||
if replaceExisting {
|
||||
for _, w := range t.getWatches(gvr, ns) {
|
||||
w.Modify(obj)
|
||||
}
|
||||
t.objects[gvr][i] = obj
|
||||
return nil
|
||||
}
|
||||
@@ -310,6 +356,10 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st
|
||||
|
||||
t.objects[gvr] = append(t.objects[gvr], obj)
|
||||
|
||||
for _, w := range t.getWatches(gvr, ns) {
|
||||
w.Add(obj)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -342,7 +392,11 @@ func (t *tracker) Delete(gvr schema.GroupVersionResource, ns, name string) error
|
||||
return err
|
||||
}
|
||||
if objMeta.GetNamespace() == ns && objMeta.GetName() == name {
|
||||
obj := t.objects[gvr][i]
|
||||
t.objects[gvr] = append(t.objects[gvr][:i], t.objects[gvr][i+1:]...)
|
||||
for _, w := range t.getWatches(gvr, ns) {
|
||||
w.Delete(obj)
|
||||
}
|
||||
found = true
|
||||
break
|
||||
}
|
||||
|
||||
192
testing/fixture_test.go
Normal file
192
testing/fixture_test.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package testing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
)
|
||||
|
||||
func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) *unstructured.Unstructured {
|
||||
return &unstructured.Unstructured{
|
||||
Object: map[string]interface{}{
|
||||
"kind": s.Resource,
|
||||
"apiVersion": s.Version,
|
||||
"metadata": map[string]interface{}{
|
||||
"name": name,
|
||||
"namespace": namespace,
|
||||
"generateName": "test_generateName",
|
||||
"uid": "test_uid",
|
||||
"resourceVersion": "test_resourceVersion",
|
||||
"selfLink": "test_selfLink",
|
||||
},
|
||||
"data": strconv.Itoa(rand.Int()),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func TestWatchCallNonNamespace(t *testing.T) {
|
||||
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
|
||||
testObj := getArbitraryResource(testResource, "test_name", "test_namespace")
|
||||
accessor, err := meta.Accessor(testObj)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
ns := accessor.GetNamespace()
|
||||
scheme := runtime.NewScheme()
|
||||
codecs := serializer.NewCodecFactory(scheme)
|
||||
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
watch, err := o.Watch(testResource, ns)
|
||||
go func() {
|
||||
err := o.Create(testResource, testObj, ns)
|
||||
if err != nil {
|
||||
t.Errorf("test resource creation failed: %v", err)
|
||||
}
|
||||
}()
|
||||
out := <-watch.ResultChan()
|
||||
assert.Equal(t, testObj, out.Object, "watched object mismatch")
|
||||
}
|
||||
|
||||
func TestWatchCallAllNamespace(t *testing.T) {
|
||||
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
|
||||
testObj := getArbitraryResource(testResource, "test_name", "test_namespace")
|
||||
accessor, err := meta.Accessor(testObj)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
ns := accessor.GetNamespace()
|
||||
scheme := runtime.NewScheme()
|
||||
codecs := serializer.NewCodecFactory(scheme)
|
||||
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
w, err := o.Watch(testResource, "test_namespace")
|
||||
wAll, err := o.Watch(testResource, "")
|
||||
go func() {
|
||||
err := o.Create(testResource, testObj, ns)
|
||||
assert.NoError(t, err, "test resource creation failed")
|
||||
}()
|
||||
out := <-w.ResultChan()
|
||||
outAll := <-wAll.ResultChan()
|
||||
assert.Equal(t, watch.Added, out.Type, "watch event mismatch")
|
||||
assert.Equal(t, watch.Added, outAll.Type, "watch event mismatch")
|
||||
assert.Equal(t, testObj, out.Object, "watched created object mismatch")
|
||||
assert.Equal(t, testObj, outAll.Object, "watched created object mismatch")
|
||||
go func() {
|
||||
err := o.Update(testResource, testObj, ns)
|
||||
assert.NoError(t, err, "test resource updating failed")
|
||||
}()
|
||||
out = <-w.ResultChan()
|
||||
outAll = <-wAll.ResultChan()
|
||||
assert.Equal(t, watch.Modified, out.Type, "watch event mismatch")
|
||||
assert.Equal(t, watch.Modified, outAll.Type, "watch event mismatch")
|
||||
assert.Equal(t, testObj, out.Object, "watched updated object mismatch")
|
||||
assert.Equal(t, testObj, outAll.Object, "watched updated object mismatch")
|
||||
go func() {
|
||||
err := o.Delete(testResource, "test_namespace", "test_name")
|
||||
assert.NoError(t, err, "test resource deletion failed")
|
||||
}()
|
||||
out = <-w.ResultChan()
|
||||
outAll = <-wAll.ResultChan()
|
||||
assert.Equal(t, watch.Deleted, out.Type, "watch event mismatch")
|
||||
assert.Equal(t, watch.Deleted, outAll.Type, "watch event mismatch")
|
||||
assert.Equal(t, testObj, out.Object, "watched deleted object mismatch")
|
||||
assert.Equal(t, testObj, outAll.Object, "watched deleted object mismatch")
|
||||
}
|
||||
|
||||
func TestWatchCallMultipleInvocation(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
op watch.EventType
|
||||
}{
|
||||
{
|
||||
"foo",
|
||||
watch.Added,
|
||||
},
|
||||
{
|
||||
"bar",
|
||||
watch.Added,
|
||||
},
|
||||
{
|
||||
"bar",
|
||||
watch.Modified,
|
||||
},
|
||||
{
|
||||
"foo",
|
||||
watch.Deleted,
|
||||
},
|
||||
{
|
||||
"bar",
|
||||
watch.Deleted,
|
||||
},
|
||||
}
|
||||
|
||||
scheme := runtime.NewScheme()
|
||||
codecs := serializer.NewCodecFactory(scheme)
|
||||
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
|
||||
|
||||
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
watchNamespaces := []string{
|
||||
"",
|
||||
"",
|
||||
"test_namespace",
|
||||
"test_namespace",
|
||||
}
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(len(watchNamespaces))
|
||||
for idx, watchNamespace := range watchNamespaces {
|
||||
i := idx
|
||||
w, err := o.Watch(testResource, watchNamespace)
|
||||
go func() {
|
||||
assert.NoError(t, err, "watch invocation failed")
|
||||
for _, c := range cases {
|
||||
fmt.Printf("%#v %#v\n", c, i)
|
||||
event := <-w.ResultChan()
|
||||
accessor, err := meta.Accessor(event.Object)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
assert.Equal(t, c.op, event.Type, "watch event mismatched")
|
||||
assert.Equal(t, c.name, accessor.GetName(), "watched object mismatch")
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
for _, c := range cases {
|
||||
switch c.op {
|
||||
case watch.Added:
|
||||
obj := getArbitraryResource(testResource, c.name, "test_namespace")
|
||||
o.Create(testResource, obj, "test_namespace")
|
||||
case watch.Modified:
|
||||
obj := getArbitraryResource(testResource, c.name, "test_namespace")
|
||||
o.Update(testResource, obj, "test_namespace")
|
||||
case watch.Deleted:
|
||||
o.Delete(testResource, "test_namespace", c.name)
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
26
tools/bootstrap/token/api/BUILD
Normal file
26
tools/bootstrap/token/api/BUILD
Normal file
@@ -0,0 +1,26 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"types.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/tools/bootstrap/token/api",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//vendor/k8s.io/api/core/v1:go_default_library"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user