mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-25 19:24:26 +00:00
Compare commits
100 Commits
kubernetes
...
v0.19.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab4be91f96 | ||
|
|
6240434e1a | ||
|
|
2247a44b6b | ||
|
|
eac0268b4e | ||
|
|
48f05c2db1 | ||
|
|
60f8ad838a | ||
|
|
9f2520a6ff | ||
|
|
afa8f1e8ea | ||
|
|
f71098ae3d | ||
|
|
4235d261af | ||
|
|
6cdba17191 | ||
|
|
c20e80a28e | ||
|
|
80b546a37f | ||
|
|
3a9f765d91 | ||
|
|
615fa027f2 | ||
|
|
ea7facdb8f | ||
|
|
70eb484951 | ||
|
|
1ded602dc0 | ||
|
|
15241c5847 | ||
|
|
0382bf0f53 | ||
|
|
a6c937f0cd | ||
|
|
b8fba595e8 | ||
|
|
2ae858f2d5 | ||
|
|
b111a62135 | ||
|
|
365234d2fc | ||
|
|
cc684433cd | ||
|
|
d7a772a8de | ||
|
|
c00c68282c | ||
|
|
f1bda3ffd6 | ||
|
|
364a20b9b1 | ||
|
|
c426e0f36d | ||
|
|
6251a13f71 | ||
|
|
2b32f6d215 | ||
|
|
da706024f3 | ||
|
|
0d5f18fe08 | ||
|
|
d4a54d1ba8 | ||
|
|
7ee24064f0 | ||
|
|
326ffd9341 | ||
|
|
f9d070a72c | ||
|
|
c3817f4bbd | ||
|
|
fe48733009 | ||
|
|
5194bac869 | ||
|
|
2093557392 | ||
|
|
fac020784f | ||
|
|
425ea3e5d0 | ||
|
|
b173caf598 | ||
|
|
7b31ec144a | ||
|
|
c0782940c8 | ||
|
|
5883a775b1 | ||
|
|
686d8407e6 | ||
|
|
1faf9e8d03 | ||
|
|
67a40b9a1a | ||
|
|
2c6476911c | ||
|
|
9836cc012a | ||
|
|
8fbf5159e5 | ||
|
|
ef1eac84b2 | ||
|
|
d319f3c8b1 | ||
|
|
d511753639 | ||
|
|
fe49f17efb | ||
|
|
4f9ddd276b | ||
|
|
7ba7043ddf | ||
|
|
f12177f0a9 | ||
|
|
03ea996864 | ||
|
|
4824e7e100 | ||
|
|
83e04303df | ||
|
|
38dc9a8fb0 | ||
|
|
32fece0e08 | ||
|
|
3eda474fce | ||
|
|
5c80d48932 | ||
|
|
756db0d4aa | ||
|
|
b60e7dd7a7 | ||
|
|
eb0bad8167 | ||
|
|
0c19a3c0da | ||
|
|
133860aa50 | ||
|
|
ec0a5f3fd2 | ||
|
|
29bb8bf344 | ||
|
|
ca7edf3d8a | ||
|
|
6776475b71 | ||
|
|
02b6fab671 | ||
|
|
bcb30edc8b | ||
|
|
dd730ded40 | ||
|
|
6b7675c693 | ||
|
|
e8be24fd4c | ||
|
|
2d3138825e | ||
|
|
f772958f8a | ||
|
|
5e1786105b | ||
|
|
cb2a050181 | ||
|
|
6720cad255 | ||
|
|
4dd6cc67e1 | ||
|
|
6f32816696 | ||
|
|
ba7b52f674 | ||
|
|
3431a996fa | ||
|
|
9d42b5ecf1 | ||
|
|
49f8c8f17a | ||
|
|
2d0dc91385 | ||
|
|
b284cb9910 | ||
|
|
6a6b2af8ea | ||
|
|
4562e6a9dd | ||
|
|
a493c8da9a | ||
|
|
72322d0c6d |
@@ -222,7 +222,7 @@ The VolumeScheduling beta feature gate is still required for this feature.
|
||||
([#67432](https://github.com/kubernetes/kubernetes/pull/67432))
|
||||
|
||||
* The CSI file system type is no longer defaulted to ext4.
|
||||
All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html
|
||||
All the production drivers listed under https://kubernetes-csi.github.io/docs/drivers.html
|
||||
were inspected and should not be impacted after this change.
|
||||
If you are using a driver not in that list,
|
||||
please test the drivers on an updated test cluster first.
|
||||
|
||||
28
Godeps/Godeps.json
generated
28
Godeps/Godeps.json
generated
@@ -12,19 +12,19 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Azure/go-autorest/autorest",
|
||||
"Rev": "v0.9.0"
|
||||
"Rev": "v0.9.6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Azure/go-autorest/autorest/adal",
|
||||
"Rev": "v0.5.0"
|
||||
"Rev": "v0.8.2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Azure/go-autorest/autorest/date",
|
||||
"Rev": "v0.1.0"
|
||||
"Rev": "v0.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Azure/go-autorest/autorest/mocks",
|
||||
"Rev": "v0.2.0"
|
||||
"Rev": "v0.3.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Azure/go-autorest/logger",
|
||||
@@ -132,7 +132,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/google/go-cmp",
|
||||
"Rev": "v0.3.0"
|
||||
"Rev": "v0.4.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/google/gofuzz",
|
||||
@@ -158,10 +158,6 @@
|
||||
"ImportPath": "github.com/googleapis/gnostic",
|
||||
"Rev": "v0.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gophercloud/gophercloud",
|
||||
"Rev": "v0.1.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gregjones/httpcache",
|
||||
"Rev": "9cad4c3443a7"
|
||||
@@ -196,7 +192,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/pretty",
|
||||
"Rev": "v0.1.0"
|
||||
"Rev": "v0.2.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/pty",
|
||||
@@ -276,7 +272,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net",
|
||||
"Rev": "13f9640d40b9"
|
||||
"Rev": "16171245cfb2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2",
|
||||
@@ -296,7 +292,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/time",
|
||||
"Rev": "9d24e82272b4"
|
||||
"Rev": "555d28b269f0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/tools",
|
||||
@@ -304,7 +300,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/xerrors",
|
||||
"Rev": "a985d3407aa7"
|
||||
"Rev": "9bdfabe68543"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api",
|
||||
@@ -324,7 +320,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/check.v1",
|
||||
"Rev": "788fd7840127"
|
||||
"Rev": "41f04d3bba15"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/fsnotify.v1",
|
||||
@@ -348,11 +344,11 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "v0.18.1"
|
||||
"Rev": "v0.19.0-alpha.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
"Rev": "v0.18.1"
|
||||
"Rev": "v0.19.0-alpha.1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo",
|
||||
|
||||
@@ -32,6 +32,99 @@ import (
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
type triggerFunc func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured
|
||||
|
||||
func triggerFactory(t *testing.T) triggerFunc {
|
||||
return func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, _ *unstructured.Unstructured) *unstructured.Unstructured {
|
||||
testObject := newUnstructured("apps/v1", "Deployment", "ns-foo", "name-foo")
|
||||
createdObj, err := fakeClient.Resource(gvr).Namespace(ns).Create(context.TODO(), testObject, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
return createdObj
|
||||
}
|
||||
}
|
||||
|
||||
func handler(rcvCh chan<- *unstructured.Unstructured) *cache.ResourceEventHandlerFuncs {
|
||||
return &cache.ResourceEventHandlerFuncs{
|
||||
AddFunc: func(obj interface{}) {
|
||||
rcvCh <- obj.(*unstructured.Unstructured)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilteredDynamicSharedInformerFactory(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
name string
|
||||
existingObj *unstructured.Unstructured
|
||||
gvr schema.GroupVersionResource
|
||||
informNS string
|
||||
ns string
|
||||
trigger func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured
|
||||
handler func(rcvCh chan<- *unstructured.Unstructured) *cache.ResourceEventHandlerFuncs
|
||||
}{
|
||||
// scenario 1
|
||||
{
|
||||
name: "scenario 1: test adding an object in different namespace should not trigger AddFunc",
|
||||
informNS: "ns-bar",
|
||||
ns: "ns-foo",
|
||||
gvr: schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"},
|
||||
trigger: triggerFactory(t),
|
||||
handler: handler,
|
||||
},
|
||||
// scenario 2
|
||||
{
|
||||
name: "scenario 2: test adding an object should trigger AddFunc",
|
||||
informNS: "ns-foo",
|
||||
ns: "ns-foo",
|
||||
gvr: schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"},
|
||||
trigger: triggerFactory(t),
|
||||
handler: handler,
|
||||
},
|
||||
}
|
||||
|
||||
for _, ts := range scenarios {
|
||||
t.Run(ts.name, func(t *testing.T) {
|
||||
// test data
|
||||
timeout := time.Duration(3 * time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
scheme := runtime.NewScheme()
|
||||
informerReciveObjectCh := make(chan *unstructured.Unstructured, 1)
|
||||
objs := []runtime.Object{}
|
||||
if ts.existingObj != nil {
|
||||
objs = append(objs, ts.existingObj)
|
||||
}
|
||||
fakeClient := fake.NewSimpleDynamicClient(scheme, objs...)
|
||||
target := dynamicinformer.NewFilteredDynamicSharedInformerFactory(fakeClient, 0, ts.informNS, nil)
|
||||
|
||||
// act
|
||||
informerListerForGvr := target.ForResource(ts.gvr)
|
||||
informerListerForGvr.Informer().AddEventHandler(ts.handler(informerReciveObjectCh))
|
||||
target.Start(ctx.Done())
|
||||
if synced := target.WaitForCacheSync(ctx.Done()); !synced[ts.gvr] {
|
||||
t.Errorf("informer for %s hasn't synced", ts.gvr)
|
||||
}
|
||||
|
||||
testObject := ts.trigger(ts.gvr, ts.ns, fakeClient, ts.existingObj)
|
||||
select {
|
||||
case objFromInformer := <-informerReciveObjectCh:
|
||||
if ts.ns != ts.informNS {
|
||||
t.Errorf("informer received an object for namespace %s when watching namespace %s", ts.ns, ts.informNS)
|
||||
}
|
||||
if !equality.Semantic.DeepEqual(testObject, objFromInformer) {
|
||||
t.Fatalf("%v", diff.ObjectDiff(testObject, objFromInformer))
|
||||
}
|
||||
case <-ctx.Done():
|
||||
if ts.ns == ts.informNS {
|
||||
t.Errorf("tested informer haven't received an object, waited %v", timeout)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestDynamicSharedInformerFactory(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
name string
|
||||
|
||||
@@ -37,7 +37,7 @@ kubectl create clusterrolebinding default-view --clusterrole=view --serviceaccou
|
||||
|
||||
Then, run the image in a Pod with a single instance Deployment:
|
||||
|
||||
kubectl run --rm -i demo --image=in-cluster --image-pull-policy=Never
|
||||
kubectl run --rm -i demo --image=in-cluster
|
||||
|
||||
There are 4 pods in the cluster
|
||||
There are 4 pods in the cluster
|
||||
|
||||
18
go.mod
18
go.mod
@@ -6,30 +6,30 @@ go 1.13
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.38.0 // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.9.0
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0
|
||||
github.com/Azure/go-autorest/autorest v0.9.6
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.2
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible
|
||||
github.com/gogo/protobuf v1.3.1
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/btree v1.0.0 // indirect
|
||||
github.com/google/go-cmp v0.4.0
|
||||
github.com/google/gofuzz v1.1.0
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/googleapis/gnostic v0.1.0
|
||||
github.com/gophercloud/gophercloud v0.1.0
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
|
||||
github.com/imdario/mergo v0.3.5
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.4.0
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
|
||||
google.golang.org/appengine v1.5.0 // indirect
|
||||
k8s.io/api v0.18.1
|
||||
k8s.io/apimachinery v0.18.1
|
||||
k8s.io/api v0.19.0-alpha.1
|
||||
k8s.io/apimachinery v0.19.0-alpha.1
|
||||
k8s.io/klog v1.0.0
|
||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
@@ -38,6 +38,6 @@ require (
|
||||
replace (
|
||||
golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13
|
||||
k8s.io/api => k8s.io/api v0.18.1
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.18.1
|
||||
k8s.io/api => k8s.io/api v0.19.0-alpha.1
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.19.0-alpha.1
|
||||
)
|
||||
|
||||
40
go.sum
40
go.sum
@@ -2,15 +2,22 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
||||
github.com/Azure/go-autorest/autorest v0.9.6 h1:5YWtOnckcudzIw8lPPBcWOnmIFWMtHci1ZWAZulMSx0=
|
||||
github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
||||
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
|
||||
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
|
||||
github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
|
||||
@@ -55,8 +62,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
|
||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
@@ -68,8 +75,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI=
|
||||
github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
@@ -85,8 +90,8 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
@@ -119,8 +124,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -136,8 +141,8 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
@@ -154,10 +159,13 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@@ -168,8 +176,8 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
@@ -182,8 +190,8 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.18.1/go.mod h1:3My4jorQWzSs5a+l7Ge6JBbIxChLnY8HnuT58ZWolss=
|
||||
k8s.io/apimachinery v0.18.1/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
|
||||
k8s.io/api v0.19.0-alpha.1/go.mod h1:fNr5XDW1/+18jRxdpIGIdL8AeDhv/8y7jmMGTpIdAoA=
|
||||
k8s.io/apimachinery v0.19.0-alpha.1/go.mod h1:MwmRUlFgPZZjQ9mmX205Ve0gth+HzXB7tiAFmJilVME=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MutatingWebhookConfigurationLister interface {
|
||||
// List lists all MutatingWebhookConfigurations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error)
|
||||
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.MutatingWebhookConfiguration, error)
|
||||
MutatingWebhookConfigurationListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ValidatingWebhookConfigurationLister interface {
|
||||
// List lists all ValidatingWebhookConfigurations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error)
|
||||
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ValidatingWebhookConfiguration, error)
|
||||
ValidatingWebhookConfigurationListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MutatingWebhookConfigurationLister interface {
|
||||
// List lists all MutatingWebhookConfigurations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error)
|
||||
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.MutatingWebhookConfiguration, error)
|
||||
MutatingWebhookConfigurationListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ValidatingWebhookConfigurationLister interface {
|
||||
// List lists all ValidatingWebhookConfigurations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error)
|
||||
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error)
|
||||
ValidatingWebhookConfigurationListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ControllerRevisionLister helps list ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionLister interface {
|
||||
// List lists all ControllerRevisions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
|
||||
// ControllerRevisions returns an object that can list and get ControllerRevisions.
|
||||
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
|
||||
}
|
||||
|
||||
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionNamespaceLister interface {
|
||||
// List lists all ControllerRevisions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
|
||||
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ControllerRevision, error)
|
||||
ControllerRevisionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DaemonSetLister helps list DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetLister interface {
|
||||
// List lists all DaemonSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
|
||||
// DaemonSets returns an object that can list and get DaemonSets.
|
||||
DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
}
|
||||
|
||||
// DaemonSetNamespaceLister helps list and get DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetNamespaceLister interface {
|
||||
// List lists all DaemonSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
|
||||
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.DaemonSet, error)
|
||||
DaemonSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DeploymentLister helps list Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentLister interface {
|
||||
// List lists all Deployments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Deployment, err error)
|
||||
// Deployments returns an object that can list and get Deployments.
|
||||
Deployments(namespace string) DeploymentNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
|
||||
}
|
||||
|
||||
// DeploymentNamespaceLister helps list and get Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentNamespaceLister interface {
|
||||
// List lists all Deployments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Deployment, err error)
|
||||
// Get retrieves the Deployment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Deployment, error)
|
||||
DeploymentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ReplicaSetLister helps list ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetLister interface {
|
||||
// List lists all ReplicaSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
|
||||
// ReplicaSets returns an object that can list and get ReplicaSets.
|
||||
ReplicaSets(namespace string) ReplicaSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList
|
||||
}
|
||||
|
||||
// ReplicaSetNamespaceLister helps list and get ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetNamespaceLister interface {
|
||||
// List lists all ReplicaSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
|
||||
// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ReplicaSet, error)
|
||||
ReplicaSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// StatefulSetLister helps list StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetLister interface {
|
||||
// List lists all StatefulSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
|
||||
// StatefulSets returns an object that can list and get StatefulSets.
|
||||
StatefulSets(namespace string) StatefulSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
|
||||
}
|
||||
|
||||
// StatefulSetNamespaceLister helps list and get StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetNamespaceLister interface {
|
||||
// List lists all StatefulSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
|
||||
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.StatefulSet, error)
|
||||
StatefulSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ControllerRevisionLister helps list ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionLister interface {
|
||||
// List lists all ControllerRevisions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
|
||||
// ControllerRevisions returns an object that can list and get ControllerRevisions.
|
||||
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
|
||||
}
|
||||
|
||||
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionNamespaceLister interface {
|
||||
// List lists all ControllerRevisions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
|
||||
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.ControllerRevision, error)
|
||||
ControllerRevisionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DeploymentLister helps list Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentLister interface {
|
||||
// List lists all Deployments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
|
||||
// Deployments returns an object that can list and get Deployments.
|
||||
Deployments(namespace string) DeploymentNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
|
||||
}
|
||||
|
||||
// DeploymentNamespaceLister helps list and get Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentNamespaceLister interface {
|
||||
// List lists all Deployments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
|
||||
// Get retrieves the Deployment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Deployment, error)
|
||||
DeploymentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// StatefulSetLister helps list StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetLister interface {
|
||||
// List lists all StatefulSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
|
||||
// StatefulSets returns an object that can list and get StatefulSets.
|
||||
StatefulSets(namespace string) StatefulSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
|
||||
}
|
||||
|
||||
// StatefulSetNamespaceLister helps list and get StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetNamespaceLister interface {
|
||||
// List lists all StatefulSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
|
||||
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.StatefulSet, error)
|
||||
StatefulSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ControllerRevisionLister helps list ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionLister interface {
|
||||
// List lists all ControllerRevisions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
|
||||
// ControllerRevisions returns an object that can list and get ControllerRevisions.
|
||||
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
|
||||
}
|
||||
|
||||
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ControllerRevisionNamespaceLister interface {
|
||||
// List lists all ControllerRevisions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
|
||||
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta2.ControllerRevision, error)
|
||||
ControllerRevisionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DaemonSetLister helps list DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetLister interface {
|
||||
// List lists all DaemonSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
|
||||
// DaemonSets returns an object that can list and get DaemonSets.
|
||||
DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
}
|
||||
|
||||
// DaemonSetNamespaceLister helps list and get DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetNamespaceLister interface {
|
||||
// List lists all DaemonSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
|
||||
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta2.DaemonSet, error)
|
||||
DaemonSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DeploymentLister helps list Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentLister interface {
|
||||
// List lists all Deployments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
|
||||
// Deployments returns an object that can list and get Deployments.
|
||||
Deployments(namespace string) DeploymentNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
|
||||
}
|
||||
|
||||
// DeploymentNamespaceLister helps list and get Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentNamespaceLister interface {
|
||||
// List lists all Deployments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
|
||||
// Get retrieves the Deployment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta2.Deployment, error)
|
||||
DeploymentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ReplicaSetLister helps list ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetLister interface {
|
||||
// List lists all ReplicaSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
|
||||
// ReplicaSets returns an object that can list and get ReplicaSets.
|
||||
ReplicaSets(namespace string) ReplicaSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList
|
||||
}
|
||||
|
||||
// ReplicaSetNamespaceLister helps list and get ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetNamespaceLister interface {
|
||||
// List lists all ReplicaSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
|
||||
// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta2.ReplicaSet, error)
|
||||
ReplicaSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// StatefulSetLister helps list StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetLister interface {
|
||||
// List lists all StatefulSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
|
||||
// StatefulSets returns an object that can list and get StatefulSets.
|
||||
StatefulSets(namespace string) StatefulSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
|
||||
}
|
||||
|
||||
// StatefulSetNamespaceLister helps list and get StatefulSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StatefulSetNamespaceLister interface {
|
||||
// List lists all StatefulSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
|
||||
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta2.StatefulSet, error)
|
||||
StatefulSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// AuditSinkLister helps list AuditSinks.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type AuditSinkLister interface {
|
||||
// List lists all AuditSinks in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error)
|
||||
// Get retrieves the AuditSink from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.AuditSink, error)
|
||||
AuditSinkListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
|
||||
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
|
||||
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerNamespaceLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
|
||||
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.HorizontalPodAutoscaler, error)
|
||||
HorizontalPodAutoscalerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
|
||||
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
|
||||
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerNamespaceLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
|
||||
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v2beta1.HorizontalPodAutoscaler, error)
|
||||
HorizontalPodAutoscalerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
|
||||
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
|
||||
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HorizontalPodAutoscalerNamespaceLister interface {
|
||||
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
|
||||
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v2beta2.HorizontalPodAutoscaler, error)
|
||||
HorizontalPodAutoscalerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// JobLister helps list Jobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type JobLister interface {
|
||||
// List lists all Jobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Job, err error)
|
||||
// Jobs returns an object that can list and get Jobs.
|
||||
Jobs(namespace string) JobNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *jobLister) Jobs(namespace string) JobNamespaceLister {
|
||||
}
|
||||
|
||||
// JobNamespaceLister helps list and get Jobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type JobNamespaceLister interface {
|
||||
// List lists all Jobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Job, err error)
|
||||
// Get retrieves the Job from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Job, error)
|
||||
JobNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// CronJobLister helps list CronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CronJobLister interface {
|
||||
// List lists all CronJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
|
||||
// CronJobs returns an object that can list and get CronJobs.
|
||||
CronJobs(namespace string) CronJobNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
|
||||
}
|
||||
|
||||
// CronJobNamespaceLister helps list and get CronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CronJobNamespaceLister interface {
|
||||
// List lists all CronJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
|
||||
// Get retrieves the CronJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.CronJob, error)
|
||||
CronJobNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// CronJobLister helps list CronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CronJobLister interface {
|
||||
// List lists all CronJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
|
||||
// CronJobs returns an object that can list and get CronJobs.
|
||||
CronJobs(namespace string) CronJobNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
|
||||
}
|
||||
|
||||
// CronJobNamespaceLister helps list and get CronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CronJobNamespaceLister interface {
|
||||
// List lists all CronJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
|
||||
// Get retrieves the CronJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v2alpha1.CronJob, error)
|
||||
CronJobNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// CertificateSigningRequestLister helps list CertificateSigningRequests.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CertificateSigningRequestLister interface {
|
||||
// List lists all CertificateSigningRequests in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error)
|
||||
// Get retrieves the CertificateSigningRequest from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.CertificateSigningRequest, error)
|
||||
CertificateSigningRequestListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// LeaseLister helps list Leases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LeaseLister interface {
|
||||
// List lists all Leases in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Lease, err error)
|
||||
// Leases returns an object that can list and get Leases.
|
||||
Leases(namespace string) LeaseNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister {
|
||||
}
|
||||
|
||||
// LeaseNamespaceLister helps list and get Leases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LeaseNamespaceLister interface {
|
||||
// List lists all Leases in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Lease, err error)
|
||||
// Get retrieves the Lease from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Lease, error)
|
||||
LeaseNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// LeaseLister helps list Leases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LeaseLister interface {
|
||||
// List lists all Leases in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Lease, err error)
|
||||
// Leases returns an object that can list and get Leases.
|
||||
Leases(namespace string) LeaseNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister {
|
||||
}
|
||||
|
||||
// LeaseNamespaceLister helps list and get Leases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LeaseNamespaceLister interface {
|
||||
// List lists all Leases in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Lease, err error)
|
||||
// Get retrieves the Lease from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Lease, error)
|
||||
LeaseNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ComponentStatusLister helps list ComponentStatuses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ComponentStatusLister interface {
|
||||
// List lists all ComponentStatuses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ComponentStatus, err error)
|
||||
// Get retrieves the ComponentStatus from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ComponentStatus, error)
|
||||
ComponentStatusListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ConfigMapLister helps list ConfigMaps.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ConfigMapLister interface {
|
||||
// List lists all ConfigMaps in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
|
||||
// ConfigMaps returns an object that can list and get ConfigMaps.
|
||||
ConfigMaps(namespace string) ConfigMapNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister
|
||||
}
|
||||
|
||||
// ConfigMapNamespaceLister helps list and get ConfigMaps.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ConfigMapNamespaceLister interface {
|
||||
// List lists all ConfigMaps in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
|
||||
// Get retrieves the ConfigMap from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ConfigMap, error)
|
||||
ConfigMapNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EndpointsLister helps list Endpoints.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointsLister interface {
|
||||
// List lists all Endpoints in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Endpoints, err error)
|
||||
// Endpoints returns an object that can list and get Endpoints.
|
||||
Endpoints(namespace string) EndpointsNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister {
|
||||
}
|
||||
|
||||
// EndpointsNamespaceLister helps list and get Endpoints.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointsNamespaceLister interface {
|
||||
// List lists all Endpoints in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Endpoints, err error)
|
||||
// Get retrieves the Endpoints from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Endpoints, error)
|
||||
EndpointsNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EventLister helps list Events.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EventLister interface {
|
||||
// List lists all Events in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Event, err error)
|
||||
// Events returns an object that can list and get Events.
|
||||
Events(namespace string) EventNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister {
|
||||
}
|
||||
|
||||
// EventNamespaceLister helps list and get Events.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EventNamespaceLister interface {
|
||||
// List lists all Events in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Event, err error)
|
||||
// Get retrieves the Event from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Event, error)
|
||||
EventNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// LimitRangeLister helps list LimitRanges.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LimitRangeLister interface {
|
||||
// List lists all LimitRanges in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.LimitRange, err error)
|
||||
// LimitRanges returns an object that can list and get LimitRanges.
|
||||
LimitRanges(namespace string) LimitRangeNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceList
|
||||
}
|
||||
|
||||
// LimitRangeNamespaceLister helps list and get LimitRanges.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type LimitRangeNamespaceLister interface {
|
||||
// List lists all LimitRanges in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.LimitRange, err error)
|
||||
// Get retrieves the LimitRange from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.LimitRange, error)
|
||||
LimitRangeNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// NamespaceLister helps list Namespaces.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NamespaceLister interface {
|
||||
// List lists all Namespaces in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Namespace, err error)
|
||||
// Get retrieves the Namespace from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Namespace, error)
|
||||
NamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// NodeLister helps list Nodes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NodeLister interface {
|
||||
// List lists all Nodes in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Node, err error)
|
||||
// Get retrieves the Node from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Node, error)
|
||||
NodeListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PersistentVolumeLister helps list PersistentVolumes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PersistentVolumeLister interface {
|
||||
// List lists all PersistentVolumes in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PersistentVolume, err error)
|
||||
// Get retrieves the PersistentVolume from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.PersistentVolume, error)
|
||||
PersistentVolumeListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PersistentVolumeClaimLister helps list PersistentVolumeClaims.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PersistentVolumeClaimLister interface {
|
||||
// List lists all PersistentVolumeClaims in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
|
||||
// PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims.
|
||||
PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) P
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PersistentVolumeClaimNamespaceLister interface {
|
||||
// List lists all PersistentVolumeClaims in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
|
||||
// Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.PersistentVolumeClaim, error)
|
||||
PersistentVolumeClaimNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PodLister helps list Pods.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodLister interface {
|
||||
// List lists all Pods in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Pod, err error)
|
||||
// Pods returns an object that can list and get Pods.
|
||||
Pods(namespace string) PodNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *podLister) Pods(namespace string) PodNamespaceLister {
|
||||
}
|
||||
|
||||
// PodNamespaceLister helps list and get Pods.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodNamespaceLister interface {
|
||||
// List lists all Pods in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Pod, err error)
|
||||
// Get retrieves the Pod from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Pod, error)
|
||||
PodNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PodTemplateLister helps list PodTemplates.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodTemplateLister interface {
|
||||
// List lists all PodTemplates in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
|
||||
// PodTemplates returns an object that can list and get PodTemplates.
|
||||
PodTemplates(namespace string) PodTemplateNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceL
|
||||
}
|
||||
|
||||
// PodTemplateNamespaceLister helps list and get PodTemplates.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodTemplateNamespaceLister interface {
|
||||
// List lists all PodTemplates in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
|
||||
// Get retrieves the PodTemplate from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.PodTemplate, error)
|
||||
PodTemplateNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ReplicationControllerLister helps list ReplicationControllers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicationControllerLister interface {
|
||||
// List lists all ReplicationControllers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
|
||||
// ReplicationControllers returns an object that can list and get ReplicationControllers.
|
||||
ReplicationControllers(namespace string) ReplicationControllerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *replicationControllerLister) ReplicationControllers(namespace string) R
|
||||
}
|
||||
|
||||
// ReplicationControllerNamespaceLister helps list and get ReplicationControllers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicationControllerNamespaceLister interface {
|
||||
// List lists all ReplicationControllers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
|
||||
// Get retrieves the ReplicationController from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ReplicationController, error)
|
||||
ReplicationControllerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ResourceQuotaLister helps list ResourceQuotas.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceQuotaLister interface {
|
||||
// List lists all ResourceQuotas in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
|
||||
// ResourceQuotas returns an object that can list and get ResourceQuotas.
|
||||
ResourceQuotas(namespace string) ResourceQuotaNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaName
|
||||
}
|
||||
|
||||
// ResourceQuotaNamespaceLister helps list and get ResourceQuotas.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceQuotaNamespaceLister interface {
|
||||
// List lists all ResourceQuotas in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
|
||||
// Get retrieves the ResourceQuota from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ResourceQuota, error)
|
||||
ResourceQuotaNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// SecretLister helps list Secrets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type SecretLister interface {
|
||||
// List lists all Secrets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Secret, err error)
|
||||
// Secrets returns an object that can list and get Secrets.
|
||||
Secrets(namespace string) SecretNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *secretLister) Secrets(namespace string) SecretNamespaceLister {
|
||||
}
|
||||
|
||||
// SecretNamespaceLister helps list and get Secrets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type SecretNamespaceLister interface {
|
||||
// List lists all Secrets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Secret, err error)
|
||||
// Get retrieves the Secret from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Secret, error)
|
||||
SecretNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ServiceLister helps list Services.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServiceLister interface {
|
||||
// List lists all Services in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Service, err error)
|
||||
// Services returns an object that can list and get Services.
|
||||
Services(namespace string) ServiceNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *serviceLister) Services(namespace string) ServiceNamespaceLister {
|
||||
}
|
||||
|
||||
// ServiceNamespaceLister helps list and get Services.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServiceNamespaceLister interface {
|
||||
// List lists all Services in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Service, err error)
|
||||
// Get retrieves the Service from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Service, error)
|
||||
ServiceNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ServiceAccountLister helps list ServiceAccounts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServiceAccountLister interface {
|
||||
// List lists all ServiceAccounts in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
|
||||
// ServiceAccounts returns an object that can list and get ServiceAccounts.
|
||||
ServiceAccounts(namespace string) ServiceAccountNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountN
|
||||
}
|
||||
|
||||
// ServiceAccountNamespaceLister helps list and get ServiceAccounts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServiceAccountNamespaceLister interface {
|
||||
// List lists all ServiceAccounts in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
|
||||
// Get retrieves the ServiceAccount from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ServiceAccount, error)
|
||||
ServiceAccountNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EndpointSliceLister helps list EndpointSlices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointSliceLister interface {
|
||||
// List lists all EndpointSlices in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error)
|
||||
// EndpointSlices returns an object that can list and get EndpointSlices.
|
||||
EndpointSlices(namespace string) EndpointSliceNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName
|
||||
}
|
||||
|
||||
// EndpointSliceNamespaceLister helps list and get EndpointSlices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointSliceNamespaceLister interface {
|
||||
// List lists all EndpointSlices in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error)
|
||||
// Get retrieves the EndpointSlice from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.EndpointSlice, error)
|
||||
EndpointSliceNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EndpointSliceLister helps list EndpointSlices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointSliceLister interface {
|
||||
// List lists all EndpointSlices in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error)
|
||||
// EndpointSlices returns an object that can list and get EndpointSlices.
|
||||
EndpointSlices(namespace string) EndpointSliceNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName
|
||||
}
|
||||
|
||||
// EndpointSliceNamespaceLister helps list and get EndpointSlices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EndpointSliceNamespaceLister interface {
|
||||
// List lists all EndpointSlices in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error)
|
||||
// Get retrieves the EndpointSlice from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.EndpointSlice, error)
|
||||
EndpointSliceNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EventLister helps list Events.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EventLister interface {
|
||||
// List lists all Events in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Event, err error)
|
||||
// Events returns an object that can list and get Events.
|
||||
Events(namespace string) EventNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister {
|
||||
}
|
||||
|
||||
// EventNamespaceLister helps list and get Events.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EventNamespaceLister interface {
|
||||
// List lists all Events in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Event, err error)
|
||||
// Get retrieves the Event from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Event, error)
|
||||
EventNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DaemonSetLister helps list DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetLister interface {
|
||||
// List lists all DaemonSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error)
|
||||
// DaemonSets returns an object that can list and get DaemonSets.
|
||||
DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
}
|
||||
|
||||
// DaemonSetNamespaceLister helps list and get DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetNamespaceLister interface {
|
||||
// List lists all DaemonSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error)
|
||||
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.DaemonSet, error)
|
||||
DaemonSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// DeploymentLister helps list Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentLister interface {
|
||||
// List lists all Deployments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
|
||||
// Deployments returns an object that can list and get Deployments.
|
||||
Deployments(namespace string) DeploymentNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
|
||||
}
|
||||
|
||||
// DeploymentNamespaceLister helps list and get Deployments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeploymentNamespaceLister interface {
|
||||
// List lists all Deployments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
|
||||
// Get retrieves the Deployment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Deployment, error)
|
||||
DeploymentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// IngressLister helps list Ingresses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressLister interface {
|
||||
// List lists all Ingresses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
|
||||
// Ingresses returns an object that can list and get Ingresses.
|
||||
Ingresses(namespace string) IngressNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister {
|
||||
}
|
||||
|
||||
// IngressNamespaceLister helps list and get Ingresses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressNamespaceLister interface {
|
||||
// List lists all Ingresses in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
|
||||
// Get retrieves the Ingress from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Ingress, error)
|
||||
IngressNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// NetworkPolicyLister helps list NetworkPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NetworkPolicyLister interface {
|
||||
// List lists all NetworkPolicies in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error)
|
||||
// NetworkPolicies returns an object that can list and get NetworkPolicies.
|
||||
NetworkPolicies(namespace string) NetworkPolicyNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNam
|
||||
}
|
||||
|
||||
// NetworkPolicyNamespaceLister helps list and get NetworkPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NetworkPolicyNamespaceLister interface {
|
||||
// List lists all NetworkPolicies in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error)
|
||||
// Get retrieves the NetworkPolicy from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.NetworkPolicy, error)
|
||||
NetworkPolicyNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PodSecurityPolicyLister helps list PodSecurityPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodSecurityPolicyLister interface {
|
||||
// List lists all PodSecurityPolicies in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error)
|
||||
// Get retrieves the PodSecurityPolicy from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.PodSecurityPolicy, error)
|
||||
PodSecurityPolicyListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// ReplicaSetLister helps list ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetLister interface {
|
||||
// List lists all ReplicaSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error)
|
||||
// ReplicaSets returns an object that can list and get ReplicaSets.
|
||||
ReplicaSets(namespace string) ReplicaSetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList
|
||||
}
|
||||
|
||||
// ReplicaSetNamespaceLister helps list and get ReplicaSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ReplicaSetNamespaceLister interface {
|
||||
// List lists all ReplicaSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error)
|
||||
// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.ReplicaSet, error)
|
||||
ReplicaSetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// FlowSchemaLister helps list FlowSchemas.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type FlowSchemaLister interface {
|
||||
// List lists all FlowSchemas in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error)
|
||||
// Get retrieves the FlowSchema from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.FlowSchema, error)
|
||||
FlowSchemaListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PriorityLevelConfigurationLister helps list PriorityLevelConfigurations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PriorityLevelConfigurationLister interface {
|
||||
// List lists all PriorityLevelConfigurations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error)
|
||||
// Get retrieves the PriorityLevelConfiguration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.PriorityLevelConfiguration, error)
|
||||
PriorityLevelConfigurationListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ImageReviewLister helps list ImageReviews.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ImageReviewLister interface {
|
||||
// List lists all ImageReviews in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ImageReview, err error)
|
||||
// Get retrieves the ImageReview from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ImageReview, error)
|
||||
ImageReviewListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// NetworkPolicyLister helps list NetworkPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NetworkPolicyLister interface {
|
||||
// List lists all NetworkPolicies in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error)
|
||||
// NetworkPolicies returns an object that can list and get NetworkPolicies.
|
||||
NetworkPolicies(namespace string) NetworkPolicyNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNam
|
||||
}
|
||||
|
||||
// NetworkPolicyNamespaceLister helps list and get NetworkPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NetworkPolicyNamespaceLister interface {
|
||||
// List lists all NetworkPolicies in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error)
|
||||
// Get retrieves the NetworkPolicy from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.NetworkPolicy, error)
|
||||
NetworkPolicyNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// IngressLister helps list Ingresses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressLister interface {
|
||||
// List lists all Ingresses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
|
||||
// Ingresses returns an object that can list and get Ingresses.
|
||||
Ingresses(namespace string) IngressNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister {
|
||||
}
|
||||
|
||||
// IngressNamespaceLister helps list and get Ingresses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressNamespaceLister interface {
|
||||
// List lists all Ingresses in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Ingress, err error)
|
||||
// Get retrieves the Ingress from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Ingress, error)
|
||||
IngressNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// IngressClassLister helps list IngressClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressClassLister interface {
|
||||
// List lists all IngressClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error)
|
||||
// Get retrieves the IngressClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.IngressClass, error)
|
||||
IngressClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// RuntimeClassLister helps list RuntimeClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RuntimeClassLister interface {
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error)
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.RuntimeClass, error)
|
||||
RuntimeClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// RuntimeClassLister helps list RuntimeClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RuntimeClassLister interface {
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error)
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.RuntimeClass, error)
|
||||
RuntimeClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EvictionLister helps list Evictions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EvictionLister interface {
|
||||
// List lists all Evictions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Eviction, err error)
|
||||
// Evictions returns an object that can list and get Evictions.
|
||||
Evictions(namespace string) EvictionNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister {
|
||||
}
|
||||
|
||||
// EvictionNamespaceLister helps list and get Evictions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EvictionNamespaceLister interface {
|
||||
// List lists all Evictions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Eviction, err error)
|
||||
// Get retrieves the Eviction from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Eviction, error)
|
||||
EvictionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PodDisruptionBudgetLister helps list PodDisruptionBudgets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodDisruptionBudgetLister interface {
|
||||
// List lists all PodDisruptionBudgets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error)
|
||||
// PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets.
|
||||
PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDi
|
||||
}
|
||||
|
||||
// PodDisruptionBudgetNamespaceLister helps list and get PodDisruptionBudgets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodDisruptionBudgetNamespaceLister interface {
|
||||
// List lists all PodDisruptionBudgets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error)
|
||||
// Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.PodDisruptionBudget, error)
|
||||
PodDisruptionBudgetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PodSecurityPolicyLister helps list PodSecurityPolicies.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodSecurityPolicyLister interface {
|
||||
// List lists all PodSecurityPolicies in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error)
|
||||
// Get retrieves the PodSecurityPolicy from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.PodSecurityPolicy, error)
|
||||
PodSecurityPolicyListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleLister helps list ClusterRoles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleLister interface {
|
||||
// List lists all ClusterRoles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ClusterRole, err error)
|
||||
// Get retrieves the ClusterRole from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ClusterRole, error)
|
||||
ClusterRoleListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleBindingLister helps list ClusterRoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleBindingLister interface {
|
||||
// List lists all ClusterRoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error)
|
||||
// Get retrieves the ClusterRoleBinding from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ClusterRoleBinding, error)
|
||||
ClusterRoleBindingListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleLister helps list Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleLister interface {
|
||||
// List lists all Roles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Role, err error)
|
||||
// Roles returns an object that can list and get Roles.
|
||||
Roles(namespace string) RoleNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
|
||||
}
|
||||
|
||||
// RoleNamespaceLister helps list and get Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleNamespaceLister interface {
|
||||
// List lists all Roles in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Role, err error)
|
||||
// Get retrieves the Role from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Role, error)
|
||||
RoleNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleBindingLister helps list RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingLister interface {
|
||||
// List lists all RoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.RoleBinding, err error)
|
||||
// RoleBindings returns an object that can list and get RoleBindings.
|
||||
RoleBindings(namespace string) RoleBindingNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL
|
||||
}
|
||||
|
||||
// RoleBindingNamespaceLister helps list and get RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingNamespaceLister interface {
|
||||
// List lists all RoleBindings in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.RoleBinding, err error)
|
||||
// Get retrieves the RoleBinding from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.RoleBinding, error)
|
||||
RoleBindingNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleLister helps list ClusterRoles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleLister interface {
|
||||
// List lists all ClusterRoles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error)
|
||||
// Get retrieves the ClusterRole from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ClusterRole, error)
|
||||
ClusterRoleListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleBindingLister helps list ClusterRoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleBindingLister interface {
|
||||
// List lists all ClusterRoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error)
|
||||
// Get retrieves the ClusterRoleBinding from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ClusterRoleBinding, error)
|
||||
ClusterRoleBindingListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleLister helps list Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleLister interface {
|
||||
// List lists all Roles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
|
||||
// Roles returns an object that can list and get Roles.
|
||||
Roles(namespace string) RoleNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
|
||||
}
|
||||
|
||||
// RoleNamespaceLister helps list and get Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleNamespaceLister interface {
|
||||
// List lists all Roles in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
|
||||
// Get retrieves the Role from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.Role, error)
|
||||
RoleNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleBindingLister helps list RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingLister interface {
|
||||
// List lists all RoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error)
|
||||
// RoleBindings returns an object that can list and get RoleBindings.
|
||||
RoleBindings(namespace string) RoleBindingNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL
|
||||
}
|
||||
|
||||
// RoleBindingNamespaceLister helps list and get RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingNamespaceLister interface {
|
||||
// List lists all RoleBindings in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error)
|
||||
// Get retrieves the RoleBinding from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.RoleBinding, error)
|
||||
RoleBindingNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleLister helps list ClusterRoles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleLister interface {
|
||||
// List lists all ClusterRoles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error)
|
||||
// Get retrieves the ClusterRole from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.ClusterRole, error)
|
||||
ClusterRoleListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// ClusterRoleBindingLister helps list ClusterRoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ClusterRoleBindingLister interface {
|
||||
// List lists all ClusterRoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error)
|
||||
// Get retrieves the ClusterRoleBinding from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.ClusterRoleBinding, error)
|
||||
ClusterRoleBindingListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleLister helps list Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleLister interface {
|
||||
// List lists all Roles in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Role, err error)
|
||||
// Roles returns an object that can list and get Roles.
|
||||
Roles(namespace string) RoleNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
|
||||
}
|
||||
|
||||
// RoleNamespaceLister helps list and get Roles.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleNamespaceLister interface {
|
||||
// List lists all Roles in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.Role, err error)
|
||||
// Get retrieves the Role from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.Role, error)
|
||||
RoleNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// RoleBindingLister helps list RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingLister interface {
|
||||
// List lists all RoleBindings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error)
|
||||
// RoleBindings returns an object that can list and get RoleBindings.
|
||||
RoleBindings(namespace string) RoleBindingNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL
|
||||
}
|
||||
|
||||
// RoleBindingNamespaceLister helps list and get RoleBindings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RoleBindingNamespaceLister interface {
|
||||
// List lists all RoleBindings in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error)
|
||||
// Get retrieves the RoleBinding from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.RoleBinding, error)
|
||||
RoleBindingNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PriorityClassLister helps list PriorityClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PriorityClassLister interface {
|
||||
// List lists all PriorityClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.PriorityClass, err error)
|
||||
// Get retrieves the PriorityClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.PriorityClass, error)
|
||||
PriorityClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PriorityClassLister helps list PriorityClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PriorityClassLister interface {
|
||||
// List lists all PriorityClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error)
|
||||
// Get retrieves the PriorityClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.PriorityClass, error)
|
||||
PriorityClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// PriorityClassLister helps list PriorityClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PriorityClassLister interface {
|
||||
// List lists all PriorityClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error)
|
||||
// Get retrieves the PriorityClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.PriorityClass, error)
|
||||
PriorityClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PodPresetLister helps list PodPresets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodPresetLister interface {
|
||||
// List lists all PodPresets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
|
||||
// PodPresets returns an object that can list and get PodPresets.
|
||||
PodPresets(namespace string) PodPresetNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister
|
||||
}
|
||||
|
||||
// PodPresetNamespaceLister helps list and get PodPresets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodPresetNamespaceLister interface {
|
||||
// List lists all PodPresets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
|
||||
// Get retrieves the PodPreset from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.PodPreset, error)
|
||||
PodPresetNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// CSIDriverLister helps list CSIDrivers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CSIDriverLister interface {
|
||||
// List lists all CSIDrivers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CSIDriver, err error)
|
||||
// Get retrieves the CSIDriver from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.CSIDriver, error)
|
||||
CSIDriverListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// CSINodeLister helps list CSINodes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CSINodeLister interface {
|
||||
// List lists all CSINodes in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CSINode, err error)
|
||||
// Get retrieves the CSINode from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.CSINode, error)
|
||||
CSINodeListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// StorageClassLister helps list StorageClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StorageClassLister interface {
|
||||
// List lists all StorageClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.StorageClass, err error)
|
||||
// Get retrieves the StorageClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.StorageClass, error)
|
||||
StorageClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// VolumeAttachmentLister helps list VolumeAttachments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type VolumeAttachmentLister interface {
|
||||
// List lists all VolumeAttachments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error)
|
||||
// Get retrieves the VolumeAttachment from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.VolumeAttachment, error)
|
||||
VolumeAttachmentListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// VolumeAttachmentLister helps list VolumeAttachments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type VolumeAttachmentLister interface {
|
||||
// List lists all VolumeAttachments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error)
|
||||
// Get retrieves the VolumeAttachment from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.VolumeAttachment, error)
|
||||
VolumeAttachmentListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// CSIDriverLister helps list CSIDrivers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CSIDriverLister interface {
|
||||
// List lists all CSIDrivers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error)
|
||||
// Get retrieves the CSIDriver from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.CSIDriver, error)
|
||||
CSIDriverListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// CSINodeLister helps list CSINodes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CSINodeLister interface {
|
||||
// List lists all CSINodes in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.CSINode, err error)
|
||||
// Get retrieves the CSINode from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.CSINode, error)
|
||||
CSINodeListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// StorageClassLister helps list StorageClasses.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StorageClassLister interface {
|
||||
// List lists all StorageClasses in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error)
|
||||
// Get retrieves the StorageClass from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.StorageClass, error)
|
||||
StorageClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,10 +26,13 @@ import (
|
||||
)
|
||||
|
||||
// VolumeAttachmentLister helps list VolumeAttachments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type VolumeAttachmentLister interface {
|
||||
// List lists all VolumeAttachments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error)
|
||||
// Get retrieves the VolumeAttachment from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.VolumeAttachment, error)
|
||||
VolumeAttachmentListerExpansion
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ type azureToken struct {
|
||||
|
||||
type tokenSource interface {
|
||||
Token() (*azureToken, error)
|
||||
Refresh(*azureToken) (*azureToken, error)
|
||||
}
|
||||
|
||||
type azureTokenSource struct {
|
||||
@@ -210,33 +211,66 @@ func (ts *azureTokenSource) Token() (*azureToken, error) {
|
||||
|
||||
var err error
|
||||
token := ts.cache.getToken(azureTokenKey)
|
||||
|
||||
if token != nil && !token.token.IsExpired() {
|
||||
return token, nil
|
||||
}
|
||||
|
||||
// retrieve from config if no cache
|
||||
if token == nil {
|
||||
token, err = ts.retrieveTokenFromCfg()
|
||||
if err != nil {
|
||||
token, err = ts.source.Token()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("acquiring a new fresh token: %v", err)
|
||||
}
|
||||
tokenFromCfg, err := ts.retrieveTokenFromCfg()
|
||||
|
||||
if err == nil {
|
||||
token = tokenFromCfg
|
||||
}
|
||||
}
|
||||
|
||||
if token != nil {
|
||||
// cache and return if the token is as good
|
||||
// avoids frequent persistor calls
|
||||
if !token.token.IsExpired() {
|
||||
ts.cache.setToken(azureTokenKey, token)
|
||||
err = ts.storeTokenInCfg(token)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("storing the token in configuration: %v", err)
|
||||
}
|
||||
return token, nil
|
||||
}
|
||||
|
||||
klog.V(4).Info("Refreshing token.")
|
||||
tokenFromRefresh, err := ts.Refresh(token)
|
||||
switch {
|
||||
case err == nil:
|
||||
token = tokenFromRefresh
|
||||
case autorest.IsTokenRefreshError(err):
|
||||
klog.V(4).Infof("Failed to refresh expired token, proceed to auth: %v", err)
|
||||
// reset token to nil so that the token source will be used to acquire new
|
||||
token = nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected error when refreshing token: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if token == nil {
|
||||
tokenFromSource, err := ts.source.Token()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed acquiring new token: %v", err)
|
||||
}
|
||||
token = tokenFromSource
|
||||
}
|
||||
|
||||
// sanity check
|
||||
if token == nil {
|
||||
return nil, fmt.Errorf("unable to acquire token")
|
||||
}
|
||||
|
||||
// corner condition, newly got token is valid but expired
|
||||
if token.token.IsExpired() {
|
||||
token, err = ts.refreshToken(token)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("refreshing the expired token: %v", err)
|
||||
}
|
||||
ts.cache.setToken(azureTokenKey, token)
|
||||
err = ts.storeTokenInCfg(token)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("storing the refreshed token in configuration: %v", err)
|
||||
}
|
||||
return nil, fmt.Errorf("newly acquired token is expired")
|
||||
}
|
||||
|
||||
err = ts.storeTokenInCfg(token)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("storing the refreshed token in configuration: %v", err)
|
||||
}
|
||||
ts.cache.setToken(azureTokenKey, token)
|
||||
|
||||
return token, nil
|
||||
}
|
||||
|
||||
@@ -273,9 +307,8 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) {
|
||||
if expiresOn == "" {
|
||||
return nil, fmt.Errorf("no expiresOn in cfg: %s", cfgExpiresOn)
|
||||
}
|
||||
tokenAudience := resourceID
|
||||
if ts.configMode == configModeDefault {
|
||||
tokenAudience = fmt.Sprintf("spn:%s", resourceID)
|
||||
resourceID = fmt.Sprintf("spn:%s", resourceID)
|
||||
}
|
||||
|
||||
return &azureToken{
|
||||
@@ -285,7 +318,7 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) {
|
||||
ExpiresIn: json.Number(expiresIn),
|
||||
ExpiresOn: json.Number(expiresOn),
|
||||
NotBefore: json.Number(expiresOn),
|
||||
Resource: tokenAudience,
|
||||
Resource: resourceID,
|
||||
Type: tokenType,
|
||||
},
|
||||
environment: environment,
|
||||
@@ -315,7 +348,13 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) {
|
||||
func (ts *azureTokenSource) Refresh(token *azureToken) (*azureToken, error) {
|
||||
return ts.source.Refresh(token)
|
||||
}
|
||||
|
||||
// refresh outdated token with adal.
|
||||
// adal.RefreshTokenError will be returned if error occur during refreshing.
|
||||
func (ts *azureTokenSourceDeviceCode) Refresh(token *azureToken) (*azureToken, error) {
|
||||
env, err := azure.EnvironmentFromName(token.environment)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -18,7 +18,8 @@ package azure
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"errors"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -171,61 +172,9 @@ func TestAzureTokenSource(t *testing.T) {
|
||||
expectedConfigModes := []string{"1", "0"}
|
||||
|
||||
for i, configMode := range configModes {
|
||||
t.Run(fmt.Sprintf("validate token from cfg with configMode %v", configMode), func(t *testing.T) {
|
||||
const (
|
||||
serverID = "fakeServerID"
|
||||
clientID = "fakeClientID"
|
||||
tenantID = "fakeTenantID"
|
||||
accessToken = "fakeToken"
|
||||
environment = "fakeEnvironment"
|
||||
refreshToken = "fakeToken"
|
||||
expiresIn = "foo"
|
||||
expiresOn = "foo"
|
||||
)
|
||||
cfg := map[string]string{
|
||||
cfgConfigMode: string(configMode),
|
||||
cfgApiserverID: serverID,
|
||||
cfgClientID: clientID,
|
||||
cfgTenantID: tenantID,
|
||||
cfgEnvironment: environment,
|
||||
cfgAccessToken: accessToken,
|
||||
cfgRefreshToken: refreshToken,
|
||||
cfgExpiresIn: expiresIn,
|
||||
cfgExpiresOn: expiresOn,
|
||||
}
|
||||
fakeSource := fakeTokenSource{}
|
||||
persiter := &fakePersister{cache: make(map[string]string)}
|
||||
tokenCache := newAzureTokenCache()
|
||||
tokenSource := newAzureTokenSource(&fakeSource, tokenCache, cfg, configMode, persiter)
|
||||
azTokenSource := tokenSource.(*azureTokenSource)
|
||||
token, err := azTokenSource.retrieveTokenFromCfg()
|
||||
if err != nil {
|
||||
t.Errorf("failed to retrieve the token form cfg: %s", err)
|
||||
}
|
||||
if token.apiserverID != serverID {
|
||||
t.Errorf("expecting token.apiserverID: %s, actual: %s", serverID, token.apiserverID)
|
||||
}
|
||||
if token.clientID != clientID {
|
||||
t.Errorf("expecting token.clientID: %s, actual: %s", clientID, token.clientID)
|
||||
}
|
||||
if token.tenantID != tenantID {
|
||||
t.Errorf("expecting token.tenantID: %s, actual: %s", tenantID, token.tenantID)
|
||||
}
|
||||
expectedAudience := serverID
|
||||
if configMode == configModeDefault {
|
||||
expectedAudience = fmt.Sprintf("spn:%s", serverID)
|
||||
}
|
||||
if token.token.Resource != expectedAudience {
|
||||
t.Errorf("expecting adal token.Resource: %s, actual: %s", expectedAudience, token.token.Resource)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("validate token against cache", func(t *testing.T) {
|
||||
fakeAccessToken := "fake token 1"
|
||||
fakeSource := fakeTokenSource{
|
||||
accessToken: fakeAccessToken,
|
||||
expiresOn: strconv.FormatInt(time.Now().Add(3600*time.Second).Unix(), 10),
|
||||
}
|
||||
fakeSource := fakeTokenSource{token: newFakeAzureToken(fakeAccessToken, time.Now().Add(3600*time.Second))}
|
||||
cfg := make(map[string]string)
|
||||
persiter := &fakePersister{cache: make(map[string]string)}
|
||||
tokenCache := newAzureTokenCache()
|
||||
@@ -260,7 +209,7 @@ func TestAzureTokenSource(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
fakeSource.accessToken = "fake token 2"
|
||||
fakeSource.token = newFakeAzureToken("fake token 2", time.Now().Add(3600*time.Second))
|
||||
token, err = tokenSource.Token()
|
||||
if err != nil {
|
||||
t.Errorf("failed to retrieve the cached token: %v", err)
|
||||
@@ -273,14 +222,161 @@ func TestAzureTokenSource(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAzureTokenSourceScenarios(t *testing.T) {
|
||||
configMode := configModeDefault
|
||||
expiredToken := newFakeAzureToken("expired token", time.Now().Add(-time.Second))
|
||||
extendedToken := newFakeAzureToken("extend token", time.Now().Add(1000*time.Second))
|
||||
fakeToken := newFakeAzureToken("fake token", time.Now().Add(1000*time.Second))
|
||||
wrongToken := newFakeAzureToken("wrong token", time.Now().Add(1000*time.Second))
|
||||
tests := []struct {
|
||||
name string
|
||||
sourceToken *azureToken
|
||||
refreshToken *azureToken
|
||||
cachedToken *azureToken
|
||||
configToken *azureToken
|
||||
expectToken *azureToken
|
||||
tokenErr error
|
||||
refreshErr error
|
||||
expectErr string
|
||||
tokenCalls uint
|
||||
refreshCalls uint
|
||||
persistCalls uint
|
||||
}{
|
||||
{
|
||||
name: "new config",
|
||||
sourceToken: fakeToken,
|
||||
expectToken: fakeToken,
|
||||
tokenCalls: 1,
|
||||
persistCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "load token from cache",
|
||||
sourceToken: wrongToken,
|
||||
cachedToken: fakeToken,
|
||||
configToken: wrongToken,
|
||||
expectToken: fakeToken,
|
||||
},
|
||||
{
|
||||
name: "load token from config",
|
||||
sourceToken: wrongToken,
|
||||
configToken: fakeToken,
|
||||
expectToken: fakeToken,
|
||||
},
|
||||
{
|
||||
name: "cached token timeout, extend success, config token should never load",
|
||||
cachedToken: expiredToken,
|
||||
refreshToken: extendedToken,
|
||||
configToken: wrongToken,
|
||||
expectToken: extendedToken,
|
||||
refreshCalls: 1,
|
||||
persistCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "config token timeout, extend failure, acquire new token",
|
||||
configToken: expiredToken,
|
||||
refreshErr: fakeTokenRefreshError{message: "FakeError happened when refreshing"},
|
||||
sourceToken: fakeToken,
|
||||
expectToken: fakeToken,
|
||||
refreshCalls: 1,
|
||||
tokenCalls: 1,
|
||||
persistCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "unexpected error when extend",
|
||||
configToken: expiredToken,
|
||||
refreshErr: errors.New("unexpected refresh error"),
|
||||
sourceToken: fakeToken,
|
||||
expectErr: "unexpected refresh error",
|
||||
refreshCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "token error",
|
||||
tokenErr: errors.New("tokenerr"),
|
||||
expectErr: "tokenerr",
|
||||
tokenCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "Token() got expired token",
|
||||
sourceToken: expiredToken,
|
||||
expectErr: "newly acquired token is expired",
|
||||
tokenCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "Token() got nil but no error",
|
||||
sourceToken: nil,
|
||||
expectErr: "unable to acquire token",
|
||||
tokenCalls: 1,
|
||||
},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
persister := newFakePersister()
|
||||
|
||||
cfg := map[string]string{}
|
||||
if tc.configToken != nil {
|
||||
cfg = token2Cfg(tc.configToken)
|
||||
}
|
||||
|
||||
tokenCache := newAzureTokenCache()
|
||||
if tc.cachedToken != nil {
|
||||
tokenCache.setToken(azureTokenKey, tc.cachedToken)
|
||||
}
|
||||
|
||||
fakeSource := fakeTokenSource{
|
||||
token: tc.sourceToken,
|
||||
tokenErr: tc.tokenErr,
|
||||
refreshToken: tc.refreshToken,
|
||||
refreshErr: tc.refreshErr,
|
||||
}
|
||||
|
||||
tokenSource := newAzureTokenSource(&fakeSource, tokenCache, cfg, configMode, &persister)
|
||||
token, err := tokenSource.Token()
|
||||
|
||||
if fakeSource.tokenCalls != tc.tokenCalls {
|
||||
t.Errorf("expecting tokenCalls: %v, got: %v", tc.tokenCalls, fakeSource.tokenCalls)
|
||||
}
|
||||
|
||||
if fakeSource.refreshCalls != tc.refreshCalls {
|
||||
t.Errorf("expecting refreshCalls: %v, got: %v", tc.refreshCalls, fakeSource.refreshCalls)
|
||||
}
|
||||
|
||||
if persister.calls != tc.persistCalls {
|
||||
t.Errorf("expecting persister calls: %v, got: %v", tc.persistCalls, persister.calls)
|
||||
}
|
||||
|
||||
if tc.expectErr != "" {
|
||||
if !strings.Contains(err.Error(), tc.expectErr) {
|
||||
t.Errorf("expecting error %v, got %v", tc.expectErr, err)
|
||||
}
|
||||
if token != nil {
|
||||
t.Errorf("token should be nil in err situation, got %v", token)
|
||||
}
|
||||
} else {
|
||||
if err != nil {
|
||||
t.Fatalf("error should be nil, got %v", err)
|
||||
}
|
||||
if token.token.AccessToken != tc.expectToken.token.AccessToken {
|
||||
t.Errorf("token should have accessToken %v, got %v", token.token.AccessToken, tc.expectToken.token.AccessToken)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type fakePersister struct {
|
||||
lock sync.Mutex
|
||||
cache map[string]string
|
||||
calls uint
|
||||
}
|
||||
|
||||
func newFakePersister() fakePersister {
|
||||
return fakePersister{cache: make(map[string]string), calls: 0}
|
||||
}
|
||||
|
||||
func (p *fakePersister) Persist(cache map[string]string) error {
|
||||
p.lock.Lock()
|
||||
defer p.lock.Unlock()
|
||||
p.calls++
|
||||
p.cache = map[string]string{}
|
||||
for k, v := range cache {
|
||||
p.cache[k] = v
|
||||
@@ -298,19 +394,24 @@ func (p *fakePersister) Cache() map[string]string {
|
||||
return ret
|
||||
}
|
||||
|
||||
// a simple token source simply always returns the token property
|
||||
type fakeTokenSource struct {
|
||||
expiresOn string
|
||||
accessToken string
|
||||
token *azureToken
|
||||
tokenCalls uint
|
||||
tokenErr error
|
||||
refreshToken *azureToken
|
||||
refreshCalls uint
|
||||
refreshErr error
|
||||
}
|
||||
|
||||
func (ts *fakeTokenSource) Token() (*azureToken, error) {
|
||||
return &azureToken{
|
||||
token: newFackeAzureToken(ts.accessToken, ts.expiresOn),
|
||||
environment: "testenv",
|
||||
clientID: "fake",
|
||||
tenantID: "fake",
|
||||
apiserverID: "fake",
|
||||
}, nil
|
||||
ts.tokenCalls++
|
||||
return ts.token, ts.tokenErr
|
||||
}
|
||||
|
||||
func (ts *fakeTokenSource) Refresh(*azureToken) (*azureToken, error) {
|
||||
ts.refreshCalls++
|
||||
return ts.refreshToken, ts.refreshErr
|
||||
}
|
||||
|
||||
func token2Cfg(token *azureToken) map[string]string {
|
||||
@@ -326,7 +427,17 @@ func token2Cfg(token *azureToken) map[string]string {
|
||||
return cfg
|
||||
}
|
||||
|
||||
func newFackeAzureToken(accessToken string, expiresOn string) adal.Token {
|
||||
func newFakeAzureToken(accessToken string, expiresOnTime time.Time) *azureToken {
|
||||
return &azureToken{
|
||||
token: newFakeADALToken(accessToken, strconv.FormatInt(expiresOnTime.Unix(), 10)),
|
||||
environment: "testenv",
|
||||
clientID: "fake",
|
||||
tenantID: "fake",
|
||||
apiserverID: "fake",
|
||||
}
|
||||
}
|
||||
|
||||
func newFakeADALToken(accessToken string, expiresOn string) adal.Token {
|
||||
return adal.Token{
|
||||
AccessToken: accessToken,
|
||||
RefreshToken: "fake",
|
||||
@@ -337,3 +448,19 @@ func newFackeAzureToken(accessToken string, expiresOn string) adal.Token {
|
||||
Type: "fake",
|
||||
}
|
||||
}
|
||||
|
||||
// copied from go-autorest/adal
|
||||
type fakeTokenRefreshError struct {
|
||||
message string
|
||||
resp *http.Response
|
||||
}
|
||||
|
||||
// Error implements the error interface which is part of the TokenRefreshError interface.
|
||||
func (tre fakeTokenRefreshError) Error() string {
|
||||
return tre.message
|
||||
}
|
||||
|
||||
// Response implements the TokenRefreshError interface, it returns the raw HTTP response from the refresh operation.
|
||||
func (tre fakeTokenRefreshError) Response() *http.Response {
|
||||
return tre.resp
|
||||
}
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package openstack
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gophercloud/gophercloud"
|
||||
"github.com/gophercloud/gophercloud/openstack"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/net"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := restclient.RegisterAuthProviderPlugin("openstack", newOpenstackAuthProvider); err != nil {
|
||||
klog.Fatalf("Failed to register openstack auth plugin: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultTTLDuration is the time before a token gets expired.
|
||||
const DefaultTTLDuration = 10 * time.Minute
|
||||
|
||||
// openstackAuthProvider is an authprovider for openstack. this provider reads
|
||||
// the environment variables to determine the client identity, and generates a
|
||||
// token which will be inserted into the request header later.
|
||||
type openstackAuthProvider struct {
|
||||
ttl time.Duration
|
||||
tokenGetter TokenGetter
|
||||
}
|
||||
|
||||
// TokenGetter returns a bearer token that can be inserted into request.
|
||||
type TokenGetter interface {
|
||||
Token() (string, error)
|
||||
}
|
||||
|
||||
type tokenGetter struct {
|
||||
authOpt *gophercloud.AuthOptions
|
||||
}
|
||||
|
||||
// Token creates a token by authenticate with keystone.
|
||||
func (t *tokenGetter) Token() (string, error) {
|
||||
var options gophercloud.AuthOptions
|
||||
var err error
|
||||
if t.authOpt == nil {
|
||||
// reads the config from the environment
|
||||
klog.V(4).Info("reading openstack config from the environment variables")
|
||||
options, err = openstack.AuthOptionsFromEnv()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to read openstack env vars: %s", err)
|
||||
}
|
||||
} else {
|
||||
options = *t.authOpt
|
||||
}
|
||||
client, err := openstack.AuthenticatedClient(options)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("authentication failed: %s", err)
|
||||
}
|
||||
return client.TokenID, nil
|
||||
}
|
||||
|
||||
// cachedGetter caches a token until it gets expired, after the expiration, it will
|
||||
// generate another token and cache it.
|
||||
type cachedGetter struct {
|
||||
mutex sync.Mutex
|
||||
tokenGetter TokenGetter
|
||||
|
||||
token string
|
||||
born time.Time
|
||||
ttl time.Duration
|
||||
}
|
||||
|
||||
// Token returns the current available token, create a new one if expired.
|
||||
func (c *cachedGetter) Token() (string, error) {
|
||||
c.mutex.Lock()
|
||||
defer c.mutex.Unlock()
|
||||
|
||||
var err error
|
||||
// no token or exceeds the TTL
|
||||
if c.token == "" || time.Since(c.born) > c.ttl {
|
||||
c.token, err = c.tokenGetter.Token()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to get token: %s", err)
|
||||
}
|
||||
c.born = time.Now()
|
||||
}
|
||||
return c.token, nil
|
||||
}
|
||||
|
||||
// tokenRoundTripper implements the RoundTripper interface: adding the bearer token
|
||||
// into the request header.
|
||||
type tokenRoundTripper struct {
|
||||
http.RoundTripper
|
||||
|
||||
tokenGetter TokenGetter
|
||||
}
|
||||
|
||||
var _ net.RoundTripperWrapper = &tokenRoundTripper{}
|
||||
|
||||
// RoundTrip adds the bearer token into the request.
|
||||
func (t *tokenRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
// if the authorization header already present, use it.
|
||||
if req.Header.Get("Authorization") != "" {
|
||||
return t.RoundTripper.RoundTrip(req)
|
||||
}
|
||||
|
||||
token, err := t.tokenGetter.Token()
|
||||
if err == nil {
|
||||
req.Header.Set("Authorization", "Bearer "+token)
|
||||
} else {
|
||||
klog.V(4).Infof("failed to get token: %s", err)
|
||||
}
|
||||
|
||||
return t.RoundTripper.RoundTrip(req)
|
||||
}
|
||||
|
||||
func (t *tokenRoundTripper) WrappedRoundTripper() http.RoundTripper { return t.RoundTripper }
|
||||
|
||||
// newOpenstackAuthProvider creates an auth provider which works with openstack
|
||||
// environment.
|
||||
func newOpenstackAuthProvider(_ string, config map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) {
|
||||
var ttlDuration time.Duration
|
||||
var err error
|
||||
|
||||
klog.Warningf("WARNING: in-tree openstack auth plugin is now deprecated. please use the \"client-keystone-auth\" kubectl/client-go credential plugin instead")
|
||||
ttl, found := config["ttl"]
|
||||
if !found {
|
||||
ttlDuration = DefaultTTLDuration
|
||||
// persist to config
|
||||
config["ttl"] = ttlDuration.String()
|
||||
if err = persister.Persist(config); err != nil {
|
||||
return nil, fmt.Errorf("failed to persist config: %s", err)
|
||||
}
|
||||
} else {
|
||||
ttlDuration, err = time.ParseDuration(ttl)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse ttl config: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
authOpt := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: config["identityEndpoint"],
|
||||
Username: config["username"],
|
||||
Password: config["password"],
|
||||
DomainName: config["name"],
|
||||
TenantID: config["tenantId"],
|
||||
TenantName: config["tenantName"],
|
||||
}
|
||||
|
||||
getter := tokenGetter{}
|
||||
// not empty
|
||||
if (authOpt != gophercloud.AuthOptions{}) {
|
||||
if len(authOpt.IdentityEndpoint) == 0 {
|
||||
return nil, fmt.Errorf("empty %q in the config for openstack auth provider", "identityEndpoint")
|
||||
}
|
||||
getter.authOpt = &authOpt
|
||||
}
|
||||
|
||||
return &openstackAuthProvider{
|
||||
ttl: ttlDuration,
|
||||
tokenGetter: &getter,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (oap *openstackAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper {
|
||||
return &tokenRoundTripper{
|
||||
RoundTripper: rt,
|
||||
tokenGetter: &cachedGetter{
|
||||
tokenGetter: oap.tokenGetter,
|
||||
ttl: oap.ttl,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (oap *openstackAuthProvider) Login() error { return nil }
|
||||
36
plugin/pkg/client/auth/openstack/openstack_stub.go
Normal file
36
plugin/pkg/client/auth/openstack/openstack_stub.go
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package openstack
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := rest.RegisterAuthProviderPlugin("openstack", newOpenstackAuthProvider); err != nil {
|
||||
klog.Fatalf("Failed to register openstack auth plugin: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func newOpenstackAuthProvider(_ string, _ map[string]string, _ rest.AuthProviderConfigPersister) (rest.AuthProvider, error) {
|
||||
return nil, errors.New(`The openstack auth plugin has been removed.
|
||||
Please use the "client-keystone-auth" kubectl/client-go credential plugin instead.
|
||||
See https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-client-keystone-auth.md for further details`)
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package openstack
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// testTokenGetter is a simple random token getter.
|
||||
type testTokenGetter struct{}
|
||||
|
||||
const LetterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
func RandStringBytes(n int) string {
|
||||
b := make([]byte, n)
|
||||
for i := range b {
|
||||
b[i] = LetterBytes[rand.Intn(len(LetterBytes))]
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (*testTokenGetter) Token() (string, error) {
|
||||
return RandStringBytes(32), nil
|
||||
}
|
||||
|
||||
// testRoundTripper is mocked roundtripper which responds with unauthorized when
|
||||
// there is no authorization header, otherwise returns status ok.
|
||||
type testRoundTripper struct{}
|
||||
|
||||
func (trt *testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
authHeader := req.Header.Get("Authorization")
|
||||
if authHeader == "" || authHeader == "Bearer " {
|
||||
return &http.Response{
|
||||
StatusCode: http.StatusUnauthorized,
|
||||
}, nil
|
||||
}
|
||||
return &http.Response{StatusCode: http.StatusOK}, nil
|
||||
}
|
||||
|
||||
func TestOpenstackAuthProvider(t *testing.T) {
|
||||
trt := &tokenRoundTripper{
|
||||
RoundTripper: &testRoundTripper{},
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
ttl time.Duration
|
||||
interval time.Duration
|
||||
same bool
|
||||
}{
|
||||
{
|
||||
name: "normal",
|
||||
ttl: 2 * time.Second,
|
||||
interval: 1 * time.Second,
|
||||
same: true,
|
||||
},
|
||||
{
|
||||
name: "expire",
|
||||
ttl: 1 * time.Second,
|
||||
interval: 2 * time.Second,
|
||||
same: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
trt.tokenGetter = &cachedGetter{
|
||||
tokenGetter: &testTokenGetter{},
|
||||
ttl: test.ttl,
|
||||
}
|
||||
|
||||
req, err := http.NewRequest(http.MethodPost, "https://test-api-server.com", nil)
|
||||
if err != nil {
|
||||
t.Errorf("failed to new request: %s", err)
|
||||
}
|
||||
trt.RoundTrip(req)
|
||||
header := req.Header.Get("Authorization")
|
||||
if header == "" {
|
||||
t.Errorf("expect to see token in header, but is absent")
|
||||
}
|
||||
|
||||
time.Sleep(test.interval)
|
||||
|
||||
req, err = http.NewRequest(http.MethodPost, "https://test-api-server.com", nil)
|
||||
if err != nil {
|
||||
t.Errorf("failed to new request: %s", err)
|
||||
}
|
||||
trt.RoundTrip(req)
|
||||
newHeader := req.Header.Get("Authorization")
|
||||
if newHeader == "" {
|
||||
t.Errorf("expect to see token in header, but is absent")
|
||||
}
|
||||
|
||||
same := newHeader == header
|
||||
if same != test.same {
|
||||
t.Errorf("expect to get %t when compare header, but saw %t", test.same, same)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type fakePersister struct{}
|
||||
|
||||
func (i *fakePersister) Persist(map[string]string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestNewOpenstackAuthProvider(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config map[string]string
|
||||
expectError bool
|
||||
}{
|
||||
{
|
||||
name: "normal config without openstack configurations",
|
||||
config: map[string]string{
|
||||
"ttl": "1s",
|
||||
"foo": "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "openstack auth provider: missing identityEndpoint",
|
||||
config: map[string]string{
|
||||
"ttl": "1s",
|
||||
"foo": "bar",
|
||||
"username": "xyz",
|
||||
"password": "123",
|
||||
"tenantName": "admin",
|
||||
},
|
||||
expectError: true,
|
||||
},
|
||||
{
|
||||
name: "openstack auth provider",
|
||||
config: map[string]string{
|
||||
"ttl": "1s",
|
||||
"foo": "bar",
|
||||
"identityEndpoint": "http://controller:35357/v3",
|
||||
"username": "xyz",
|
||||
"password": "123",
|
||||
"tenantName": "admin",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
_, err := newOpenstackAuthProvider("test", test.config, &fakePersister{})
|
||||
if err != nil {
|
||||
if !test.expectError {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
} else {
|
||||
if test.expectError {
|
||||
t.Error("expect error, but nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
tools/cache/controller.go
vendored
12
tools/cache/controller.go
vendored
@@ -183,9 +183,11 @@ func (c *controller) processLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
// ResourceEventHandler can handle notifications for events that happen to a
|
||||
// resource. The events are informational only, so you can't return an
|
||||
// error.
|
||||
// ResourceEventHandler can handle notifications for events that
|
||||
// happen to a resource. The events are informational only, so you
|
||||
// can't return an error. The handlers MUST NOT modify the objects
|
||||
// received; this concerns not only the top level of structure but all
|
||||
// the data structures reachable from it.
|
||||
// * OnAdd is called when an object is added.
|
||||
// * OnUpdate is called when an object is modified. Note that oldObj is the
|
||||
// last known state of the object-- it is possible that several changes
|
||||
@@ -205,7 +207,8 @@ type ResourceEventHandler interface {
|
||||
|
||||
// ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or
|
||||
// as few of the notification functions as you want while still implementing
|
||||
// ResourceEventHandler.
|
||||
// ResourceEventHandler. This adapter does not remove the prohibition against
|
||||
// modifying the objects.
|
||||
type ResourceEventHandlerFuncs struct {
|
||||
AddFunc func(obj interface{})
|
||||
UpdateFunc func(oldObj, newObj interface{})
|
||||
@@ -237,6 +240,7 @@ func (r ResourceEventHandlerFuncs) OnDelete(obj interface{}) {
|
||||
// in, ensuring the appropriate nested handler method is invoked. An object
|
||||
// that starts passing the filter after an update is considered an add, and an
|
||||
// object that stops passing the filter after an update is considered a delete.
|
||||
// Like the handlers, the filter MUST NOT modify the objects it is given.
|
||||
type FilteringResourceEventHandler struct {
|
||||
FilterFunc func(obj interface{}) bool
|
||||
Handler ResourceEventHandler
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user