mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-04 18:56:21 +00:00
Merge pull request #129 from caesarxuchao/sync-Feb-23
Sync with k8s.io/kubernetes/staging
This commit is contained in:
commit
65ac4e638a
@ -4,6 +4,8 @@ fixing this.
|
|||||||
|
|
||||||
# HEAD (changes that will go into the next release)
|
# HEAD (changes that will go into the next release)
|
||||||
* Added dependency on k8s.io/apimachinery
|
* Added dependency on k8s.io/apimachinery
|
||||||
|
* Added generated listers and informers
|
||||||
|
* CHANGED: pass typed options to dynamic client (https://github.com/kubernetes/kubernetes/pull/41887)
|
||||||
|
|
||||||
# v2.0.0
|
# v2.0.0
|
||||||
|
|
||||||
|
90
Godeps/Godeps.json
generated
90
Godeps/Godeps.json
generated
@ -316,175 +316,179 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/openapi",
|
"ImportPath": "k8s.io/apimachinery/pkg/openapi",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||||
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||||
"Rev": "7080e31e90e981181435294bca96c80a37db8941"
|
"Rev": "d90aa2c8531f13b0ca734845934c10dcb6a56ca7"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err
|
|||||||
v := &metav1.APIVersions{}
|
v := &metav1.APIVersions{}
|
||||||
err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
|
err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
|
||||||
apiGroup := metav1.APIGroup{}
|
apiGroup := metav1.APIGroup{}
|
||||||
if err == nil {
|
if err == nil && len(v.Versions) != 0 {
|
||||||
apiGroup = apiVersionsToAPIGroup(v)
|
apiGroup = apiVersionsToAPIGroup(v)
|
||||||
}
|
}
|
||||||
if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
|
if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
|
||||||
@ -141,8 +141,10 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err
|
|||||||
apiGroupList = &metav1.APIGroupList{}
|
apiGroupList = &metav1.APIGroupList{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// append the group retrieved from /api to the list
|
// append the group retrieved from /api to the list if not empty
|
||||||
apiGroupList.Groups = append(apiGroupList.Groups, apiGroup)
|
if len(v.Versions) != 0 {
|
||||||
|
apiGroupList.Groups = append(apiGroupList.Groups, apiGroup)
|
||||||
|
}
|
||||||
return apiGroupList, nil
|
return apiGroupList, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,6 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
apimachineryversion "k8s.io/apimachinery/pkg/version"
|
apimachineryversion "k8s.io/apimachinery/pkg/version"
|
||||||
// Import solely to initialize client auth plugins.
|
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MatchesServerVersion queries the server to compares the build version
|
// MatchesServerVersion queries the server to compares the build version
|
||||||
@ -49,6 +47,9 @@ func MatchesServerVersion(clientVersion apimachineryversion.Info, client Discove
|
|||||||
// preference.
|
// preference.
|
||||||
// - If version is provided and the server does not support it,
|
// - If version is provided and the server does not support it,
|
||||||
// return an error.
|
// return an error.
|
||||||
|
// TODO negotiation should be reserved for cases where we need a version for a given group. In those cases, it should return an ordered list of
|
||||||
|
// server preferences. From that list, a separate function can match from an ordered list of client versions.
|
||||||
|
// This is not what the function has ever done before, but it makes more logical sense.
|
||||||
func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion, clientRegisteredGVs []schema.GroupVersion) (*schema.GroupVersion, error) {
|
func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion, clientRegisteredGVs []schema.GroupVersion) (*schema.GroupVersion, error) {
|
||||||
clientVersions := sets.String{}
|
clientVersions := sets.String{}
|
||||||
for _, gv := range clientRegisteredGVs {
|
for _, gv := range clientRegisteredGVs {
|
||||||
@ -104,8 +105,8 @@ func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion
|
|||||||
return &clientRegisteredGVs[0], nil
|
return &clientRegisteredGVs[0], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, fmt.Errorf("failed to negotiate an api version; server supports: %v, client supports: %v",
|
// fall back to an empty GroupVersion. Most client commands no longer respect a GroupVersion anyway
|
||||||
serverVersions, clientVersions)
|
return &schema.GroupVersion{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupVersionResources converts APIResourceLists to the GroupVersionResources.
|
// GroupVersionResources converts APIResourceLists to the GroupVersionResources.
|
||||||
|
@ -118,9 +118,9 @@ func TestNegotiateVersion(t *testing.T) {
|
|||||||
statusCode: http.StatusNotFound,
|
statusCode: http.StatusNotFound,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "discovery fails due to 403 Forbidden errors and thus serverVersions is empty, no fallback GroupVersion",
|
name: "discovery fails due to 403 Forbidden errors and thus serverVersions is empty, fallback to empty GroupVersion",
|
||||||
expectErr: func(err error) bool { return strings.Contains(err.Error(), "failed to negotiate an api version;") },
|
expectedVersion: &schema.GroupVersion{},
|
||||||
statusCode: http.StatusForbidden,
|
statusCode: http.StatusForbidden,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ type ResourceClient struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List returns a list of objects for this resource.
|
// List returns a list of objects for this resource.
|
||||||
func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) {
|
func (rc *ResourceClient) List(opts metav1.ListOptions) (runtime.Object, error) {
|
||||||
parameterEncoder := rc.parameterCodec
|
parameterEncoder := rc.parameterCodec
|
||||||
if parameterEncoder == nil {
|
if parameterEncoder == nil {
|
||||||
parameterEncoder = defaultParameterEncoder
|
parameterEncoder = defaultParameterEncoder
|
||||||
@ -120,7 +120,7 @@ func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) {
|
|||||||
return rc.cl.Get().
|
return rc.cl.Get().
|
||||||
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
||||||
Resource(rc.resource.Name).
|
Resource(rc.resource.Name).
|
||||||
VersionedParams(opts, parameterEncoder).
|
VersionedParams(&opts, parameterEncoder).
|
||||||
Do().
|
Do().
|
||||||
Get()
|
Get()
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ func (rc *ResourceClient) Delete(name string, opts *metav1.DeleteOptions) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
// DeleteCollection deletes a collection of objects.
|
||||||
func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions runtime.Object) error {
|
func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
parameterEncoder := rc.parameterCodec
|
parameterEncoder := rc.parameterCodec
|
||||||
if parameterEncoder == nil {
|
if parameterEncoder == nil {
|
||||||
parameterEncoder = defaultParameterEncoder
|
parameterEncoder = defaultParameterEncoder
|
||||||
@ -157,7 +157,7 @@ func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions,
|
|||||||
return rc.cl.Delete().
|
return rc.cl.Delete().
|
||||||
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
||||||
Resource(rc.resource.Name).
|
Resource(rc.resource.Name).
|
||||||
VersionedParams(listOptions, parameterEncoder).
|
VersionedParams(&listOptions, parameterEncoder).
|
||||||
Body(deleteOptions).
|
Body(deleteOptions).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
@ -192,16 +192,16 @@ func (rc *ResourceClient) Update(obj *unstructured.Unstructured) (*unstructured.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the resource.
|
// Watch returns a watch.Interface that watches the resource.
|
||||||
func (rc *ResourceClient) Watch(opts runtime.Object) (watch.Interface, error) {
|
func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
parameterEncoder := rc.parameterCodec
|
parameterEncoder := rc.parameterCodec
|
||||||
if parameterEncoder == nil {
|
if parameterEncoder == nil {
|
||||||
parameterEncoder = defaultParameterEncoder
|
parameterEncoder = defaultParameterEncoder
|
||||||
}
|
}
|
||||||
|
opts.Watch = true
|
||||||
return rc.cl.Get().
|
return rc.cl.Get().
|
||||||
Prefix("watch").
|
|
||||||
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
|
||||||
Resource(rc.resource.Name).
|
Resource(rc.resource.Name).
|
||||||
VersionedParams(opts, parameterEncoder).
|
VersionedParams(&opts, parameterEncoder).
|
||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
|
|
||||||
"k8s.io/apimachinery/pkg/api/meta"
|
"k8s.io/apimachinery/pkg/api/meta"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
"k8s.io/client-go/pkg/api"
|
||||||
restclient "k8s.io/client-go/rest"
|
restclient "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,6 +71,13 @@ func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathRes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Instantiates a new dynamic client pool with the given config.
|
||||||
|
func NewDynamicClientPool(cfg *restclient.Config) ClientPool {
|
||||||
|
// TODO: should use a dynamic RESTMapper built from the discovery results.
|
||||||
|
restMapper := api.Registry.RESTMapper()
|
||||||
|
return NewClientPool(cfg, restMapper, LegacyAPIPathResolverFunc)
|
||||||
|
}
|
||||||
|
|
||||||
// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may
|
// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may
|
||||||
// be empty. If no matching kind is found the underlying client for that group is still returned.
|
// be empty. If no matching kind is found the underlying client for that group is still returned.
|
||||||
func (c *clientPoolImpl) ClientForGroupVersionResource(resource schema.GroupVersionResource) (*Client, error) {
|
func (c *clientPoolImpl) ClientForGroupVersionResource(resource schema.GroupVersionResource) (*Client, error) {
|
||||||
|
@ -136,7 +136,7 @@ func TestList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
defer srv.Close()
|
defer srv.Close()
|
||||||
|
|
||||||
got, err := cl.Resource(resource, tc.namespace).List(&metav1.ListOptions{})
|
got, err := cl.Resource(resource, tc.namespace).List(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpected error when listing %q: %v", tc.name, err)
|
t.Errorf("unexpected error when listing %q: %v", tc.name, err)
|
||||||
continue
|
continue
|
||||||
@ -293,7 +293,7 @@ func TestDeleteCollection(t *testing.T) {
|
|||||||
}
|
}
|
||||||
defer srv.Close()
|
defer srv.Close()
|
||||||
|
|
||||||
err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &metav1.ListOptions{})
|
err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err)
|
t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err)
|
||||||
continue
|
continue
|
||||||
@ -425,10 +425,12 @@ func TestWatch(t *testing.T) {
|
|||||||
namespace string
|
namespace string
|
||||||
events []watch.Event
|
events []watch.Event
|
||||||
path string
|
path string
|
||||||
|
query string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "normal_watch",
|
name: "normal_watch",
|
||||||
path: "/api/gtest/vtest/watch/rtest",
|
path: "/api/gtest/vtest/rtest",
|
||||||
|
query: "watch=true",
|
||||||
events: []watch.Event{
|
events: []watch.Event{
|
||||||
{Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")},
|
{Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")},
|
||||||
{Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")},
|
{Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")},
|
||||||
@ -438,7 +440,8 @@ func TestWatch(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "namespaced_watch",
|
name: "namespaced_watch",
|
||||||
namespace: "nstest",
|
namespace: "nstest",
|
||||||
path: "/api/gtest/vtest/watch/namespaces/nstest/rtest",
|
path: "/api/gtest/vtest/namespaces/nstest/rtest",
|
||||||
|
query: "watch=true",
|
||||||
events: []watch.Event{
|
events: []watch.Event{
|
||||||
{Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")},
|
{Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")},
|
||||||
{Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")},
|
{Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")},
|
||||||
@ -457,6 +460,9 @@ func TestWatch(t *testing.T) {
|
|||||||
if r.URL.Path != tc.path {
|
if r.URL.Path != tc.path {
|
||||||
t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
|
t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
|
||||||
}
|
}
|
||||||
|
if r.URL.RawQuery != tc.query {
|
||||||
|
t.Errorf("Watch(%q) got query %s. wanted %s", tc.name, r.URL.RawQuery, tc.query)
|
||||||
|
}
|
||||||
|
|
||||||
enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
|
enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
|
||||||
for _, e := range tc.events {
|
for _, e := range tc.events {
|
||||||
@ -469,7 +475,7 @@ func TestWatch(t *testing.T) {
|
|||||||
}
|
}
|
||||||
defer srv.Close()
|
defer srv.Close()
|
||||||
|
|
||||||
watcher, err := cl.Resource(resource, tc.namespace).Watch(&metav1.ListOptions{})
|
watcher, err := cl.Resource(resource, tc.namespace).Watch(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpected error when watching %q: %v", tc.name, err)
|
t.Errorf("unexpected error when watching %q: %v", tc.name, err)
|
||||||
continue
|
continue
|
||||||
|
@ -26,11 +26,8 @@ import (
|
|||||||
"k8s.io/client-go/tools/clientcmd"
|
"k8s.io/client-go/tools/clientcmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
kubeconfig = flag.String("kubeconfig", "./config", "absolute path to the kubeconfig file")
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
kubeconfig := flag.String("kubeconfig", "./config", "absolute path to the kubeconfig file")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
// uses the current context in kubeconfig
|
// uses the current context in kubeconfig
|
||||||
config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig)
|
config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig)
|
||||||
|
@ -35,10 +35,6 @@ import (
|
|||||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
config *rest.Config
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
kubeconfig := flag.String("kubeconfig", "", "Path to a kube config. Only required if out-of-cluster.")
|
kubeconfig := flag.String("kubeconfig", "", "Path to a kube config. Only required if out-of-cluster.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -14,14 +14,15 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package api
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.
|
var _ runtime.Object = &Example{}
|
||||||
func HasObjectMetaSystemFieldValues(meta *metav1.ObjectMeta) bool {
|
var _ metav1.ObjectMetaAccessor = &Example{}
|
||||||
return !meta.CreationTimestamp.Time.IsZero() ||
|
|
||||||
len(meta.UID) != 0
|
var _ runtime.Object = &ExampleList{}
|
||||||
}
|
var _ metav1.ListMetaAccessor = &ExampleList{}
|
44
informers/apps/interface.go
Normal file
44
informers/apps/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package apps
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/client-go/informers/apps/v1beta1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
43
informers/apps/v1beta1/interface.go
Normal file
43
informers/apps/v1beta1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// StatefulSets returns a StatefulSetInformer.
|
||||||
|
StatefulSets() StatefulSetInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// StatefulSets returns a StatefulSetInformer.
|
||||||
|
func (v *version) StatefulSets() StatefulSetInformer {
|
||||||
|
return &statefulSetInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/apps/v1beta1/statefulset.go
Normal file
68
informers/apps/v1beta1/statefulset.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
|
||||||
|
apps_v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StatefulSetInformer provides access to a shared informer and lister for
|
||||||
|
// StatefulSets.
|
||||||
|
type StatefulSetInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.StatefulSetLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type statefulSetInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newStatefulSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.AppsV1beta1().StatefulSets(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.AppsV1beta1().StatefulSets(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&apps_v1beta1.StatefulSet{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *statefulSetInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&apps_v1beta1.StatefulSet{}, newStatefulSetInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *statefulSetInformer) Lister() v1beta1.StatefulSetLister {
|
||||||
|
return v1beta1.NewStatefulSetLister(f.Informer().GetIndexer())
|
||||||
|
}
|
52
informers/autoscaling/interface.go
Normal file
52
informers/autoscaling/interface.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package autoscaling
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/client-go/informers/autoscaling/v1"
|
||||||
|
v2alpha1 "k8s.io/client-go/informers/autoscaling/v2alpha1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.Interface
|
||||||
|
// V2alpha1 provides access to shared informers for resources in V2alpha1.
|
||||||
|
V2alpha1() v2alpha1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.New(g.SharedInformerFactory)
|
||||||
|
}
|
||||||
|
|
||||||
|
// V2alpha1 returns a new v2alpha1.Interface.
|
||||||
|
func (g *group) V2alpha1() v2alpha1.Interface {
|
||||||
|
return v2alpha1.New(g.SharedInformerFactory)
|
||||||
|
}
|
68
informers/autoscaling/v1/horizontalpodautoscaler.go
Normal file
68
informers/autoscaling/v1/horizontalpodautoscaler.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/autoscaling/v1"
|
||||||
|
autoscaling_v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
|
||||||
|
// HorizontalPodAutoscalers.
|
||||||
|
type HorizontalPodAutoscalerInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.HorizontalPodAutoscalerLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type horizontalPodAutoscalerInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&autoscaling_v1.HorizontalPodAutoscaler{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&autoscaling_v1.HorizontalPodAutoscaler{}, newHorizontalPodAutoscalerInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *horizontalPodAutoscalerInformer) Lister() v1.HorizontalPodAutoscalerLister {
|
||||||
|
return v1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
|
||||||
|
}
|
43
informers/autoscaling/v1/interface.go
Normal file
43
informers/autoscaling/v1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
|
||||||
|
HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
|
||||||
|
func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
|
||||||
|
return &horizontalPodAutoscalerInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/autoscaling/v2alpha1/horizontalpodautoscaler.go
Normal file
68
informers/autoscaling/v2alpha1/horizontalpodautoscaler.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v2alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v2alpha1 "k8s.io/client-go/listers/autoscaling/v2alpha1"
|
||||||
|
autoscaling_v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for
|
||||||
|
// HorizontalPodAutoscalers.
|
||||||
|
type HorizontalPodAutoscalerInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v2alpha1.HorizontalPodAutoscalerLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type horizontalPodAutoscalerInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&autoscaling_v2alpha1.HorizontalPodAutoscaler{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&autoscaling_v2alpha1.HorizontalPodAutoscaler{}, newHorizontalPodAutoscalerInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *horizontalPodAutoscalerInformer) Lister() v2alpha1.HorizontalPodAutoscalerLister {
|
||||||
|
return v2alpha1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
|
||||||
|
}
|
43
informers/autoscaling/v2alpha1/interface.go
Normal file
43
informers/autoscaling/v2alpha1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v2alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
|
||||||
|
HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
|
||||||
|
func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
|
||||||
|
return &horizontalPodAutoscalerInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
52
informers/batch/interface.go
Normal file
52
informers/batch/interface.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package batch
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/client-go/informers/batch/v1"
|
||||||
|
v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.Interface
|
||||||
|
// V2alpha1 provides access to shared informers for resources in V2alpha1.
|
||||||
|
V2alpha1() v2alpha1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.New(g.SharedInformerFactory)
|
||||||
|
}
|
||||||
|
|
||||||
|
// V2alpha1 returns a new v2alpha1.Interface.
|
||||||
|
func (g *group) V2alpha1() v2alpha1.Interface {
|
||||||
|
return v2alpha1.New(g.SharedInformerFactory)
|
||||||
|
}
|
43
informers/batch/v1/interface.go
Normal file
43
informers/batch/v1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// Jobs returns a JobInformer.
|
||||||
|
Jobs() JobInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jobs returns a JobInformer.
|
||||||
|
func (v *version) Jobs() JobInformer {
|
||||||
|
return &jobInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/batch/v1/job.go
Normal file
68
informers/batch/v1/job.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/batch/v1"
|
||||||
|
batch_v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// JobInformer provides access to a shared informer and lister for
|
||||||
|
// Jobs.
|
||||||
|
type JobInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.JobLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type jobInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.BatchV1().Jobs(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.BatchV1().Jobs(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&batch_v1.Job{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *jobInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&batch_v1.Job{}, newJobInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *jobInformer) Lister() v1.JobLister {
|
||||||
|
return v1.NewJobLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/batch/v2alpha1/cronjob.go
Normal file
68
informers/batch/v2alpha1/cronjob.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v2alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
|
||||||
|
batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CronJobInformer provides access to a shared informer and lister for
|
||||||
|
// CronJobs.
|
||||||
|
type CronJobInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v2alpha1.CronJobLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type cronJobInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCronJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.BatchV2alpha1().CronJobs(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.BatchV2alpha1().CronJobs(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&batch_v2alpha1.CronJob{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *cronJobInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&batch_v2alpha1.CronJob{}, newCronJobInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *cronJobInformer) Lister() v2alpha1.CronJobLister {
|
||||||
|
return v2alpha1.NewCronJobLister(f.Informer().GetIndexer())
|
||||||
|
}
|
50
informers/batch/v2alpha1/interface.go
Normal file
50
informers/batch/v2alpha1/interface.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v2alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// CronJobs returns a CronJobInformer.
|
||||||
|
CronJobs() CronJobInformer
|
||||||
|
// Jobs returns a JobInformer.
|
||||||
|
Jobs() JobInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CronJobs returns a CronJobInformer.
|
||||||
|
func (v *version) CronJobs() CronJobInformer {
|
||||||
|
return &cronJobInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jobs returns a JobInformer.
|
||||||
|
func (v *version) Jobs() JobInformer {
|
||||||
|
return &jobInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/batch/v2alpha1/job.go
Normal file
68
informers/batch/v2alpha1/job.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v2alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
|
||||||
|
batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// JobInformer provides access to a shared informer and lister for
|
||||||
|
// Jobs.
|
||||||
|
type JobInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v2alpha1.JobLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type jobInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.BatchV2alpha1().Jobs(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.BatchV2alpha1().Jobs(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&batch_v2alpha1.Job{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *jobInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&batch_v2alpha1.Job{}, newJobInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *jobInformer) Lister() v2alpha1.JobLister {
|
||||||
|
return v2alpha1.NewJobLister(f.Informer().GetIndexer())
|
||||||
|
}
|
44
informers/certificates/interface.go
Normal file
44
informers/certificates/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package certificates
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/client-go/informers/certificates/v1beta1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
68
informers/certificates/v1beta1/certificatesigningrequest.go
Normal file
68
informers/certificates/v1beta1/certificatesigningrequest.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
|
||||||
|
certificates_v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CertificateSigningRequestInformer provides access to a shared informer and lister for
|
||||||
|
// CertificateSigningRequests.
|
||||||
|
type CertificateSigningRequestInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.CertificateSigningRequestLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type certificateSigningRequestInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CertificatesV1beta1().CertificateSigningRequests().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&certificates_v1beta1.CertificateSigningRequest{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&certificates_v1beta1.CertificateSigningRequest{}, newCertificateSigningRequestInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *certificateSigningRequestInformer) Lister() v1beta1.CertificateSigningRequestLister {
|
||||||
|
return v1beta1.NewCertificateSigningRequestLister(f.Informer().GetIndexer())
|
||||||
|
}
|
43
informers/certificates/v1beta1/interface.go
Normal file
43
informers/certificates/v1beta1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// CertificateSigningRequests returns a CertificateSigningRequestInformer.
|
||||||
|
CertificateSigningRequests() CertificateSigningRequestInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CertificateSigningRequests returns a CertificateSigningRequestInformer.
|
||||||
|
func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer {
|
||||||
|
return &certificateSigningRequestInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
44
informers/core/interface.go
Normal file
44
informers/core/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/client-go/informers/core/v1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.New(g.SharedInformerFactory)
|
||||||
|
}
|
68
informers/core/v1/componentstatus.go
Normal file
68
informers/core/v1/componentstatus.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ComponentStatusInformer provides access to a shared informer and lister for
|
||||||
|
// ComponentStatuses.
|
||||||
|
type ComponentStatusInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ComponentStatusLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type componentStatusInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().ComponentStatuses().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().ComponentStatuses().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.ComponentStatus{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *componentStatusInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.ComponentStatus{}, newComponentStatusInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *componentStatusInformer) Lister() v1.ComponentStatusLister {
|
||||||
|
return v1.NewComponentStatusLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/configmap.go
Normal file
68
informers/core/v1/configmap.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConfigMapInformer provides access to a shared informer and lister for
|
||||||
|
// ConfigMaps.
|
||||||
|
type ConfigMapInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ConfigMapLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type configMapInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newConfigMapInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.ConfigMap{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *configMapInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.ConfigMap{}, newConfigMapInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *configMapInformer) Lister() v1.ConfigMapLister {
|
||||||
|
return v1.NewConfigMapLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/endpoints.go
Normal file
68
informers/core/v1/endpoints.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EndpointsInformer provides access to a shared informer and lister for
|
||||||
|
// Endpoints.
|
||||||
|
type EndpointsInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.EndpointsLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type endpointsInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newEndpointsInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Endpoints(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Endpoints(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Endpoints{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *endpointsInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Endpoints{}, newEndpointsInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *endpointsInformer) Lister() v1.EndpointsLister {
|
||||||
|
return v1.NewEndpointsLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/event.go
Normal file
68
informers/core/v1/event.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EventInformer provides access to a shared informer and lister for
|
||||||
|
// Events.
|
||||||
|
type EventInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.EventLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type eventInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newEventInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Events(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Events(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Event{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *eventInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Event{}, newEventInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *eventInformer) Lister() v1.EventLister {
|
||||||
|
return v1.NewEventLister(f.Informer().GetIndexer())
|
||||||
|
}
|
148
informers/core/v1/interface.go
Normal file
148
informers/core/v1/interface.go
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// ComponentStatuses returns a ComponentStatusInformer.
|
||||||
|
ComponentStatuses() ComponentStatusInformer
|
||||||
|
// ConfigMaps returns a ConfigMapInformer.
|
||||||
|
ConfigMaps() ConfigMapInformer
|
||||||
|
// Endpoints returns a EndpointsInformer.
|
||||||
|
Endpoints() EndpointsInformer
|
||||||
|
// Events returns a EventInformer.
|
||||||
|
Events() EventInformer
|
||||||
|
// LimitRanges returns a LimitRangeInformer.
|
||||||
|
LimitRanges() LimitRangeInformer
|
||||||
|
// Namespaces returns a NamespaceInformer.
|
||||||
|
Namespaces() NamespaceInformer
|
||||||
|
// Nodes returns a NodeInformer.
|
||||||
|
Nodes() NodeInformer
|
||||||
|
// PersistentVolumes returns a PersistentVolumeInformer.
|
||||||
|
PersistentVolumes() PersistentVolumeInformer
|
||||||
|
// PersistentVolumeClaims returns a PersistentVolumeClaimInformer.
|
||||||
|
PersistentVolumeClaims() PersistentVolumeClaimInformer
|
||||||
|
// Pods returns a PodInformer.
|
||||||
|
Pods() PodInformer
|
||||||
|
// PodTemplates returns a PodTemplateInformer.
|
||||||
|
PodTemplates() PodTemplateInformer
|
||||||
|
// ReplicationControllers returns a ReplicationControllerInformer.
|
||||||
|
ReplicationControllers() ReplicationControllerInformer
|
||||||
|
// ResourceQuotas returns a ResourceQuotaInformer.
|
||||||
|
ResourceQuotas() ResourceQuotaInformer
|
||||||
|
// Secrets returns a SecretInformer.
|
||||||
|
Secrets() SecretInformer
|
||||||
|
// Services returns a ServiceInformer.
|
||||||
|
Services() ServiceInformer
|
||||||
|
// ServiceAccounts returns a ServiceAccountInformer.
|
||||||
|
ServiceAccounts() ServiceAccountInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ComponentStatuses returns a ComponentStatusInformer.
|
||||||
|
func (v *version) ComponentStatuses() ComponentStatusInformer {
|
||||||
|
return &componentStatusInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConfigMaps returns a ConfigMapInformer.
|
||||||
|
func (v *version) ConfigMaps() ConfigMapInformer {
|
||||||
|
return &configMapInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Endpoints returns a EndpointsInformer.
|
||||||
|
func (v *version) Endpoints() EndpointsInformer {
|
||||||
|
return &endpointsInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Events returns a EventInformer.
|
||||||
|
func (v *version) Events() EventInformer {
|
||||||
|
return &eventInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LimitRanges returns a LimitRangeInformer.
|
||||||
|
func (v *version) LimitRanges() LimitRangeInformer {
|
||||||
|
return &limitRangeInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Namespaces returns a NamespaceInformer.
|
||||||
|
func (v *version) Namespaces() NamespaceInformer {
|
||||||
|
return &namespaceInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nodes returns a NodeInformer.
|
||||||
|
func (v *version) Nodes() NodeInformer {
|
||||||
|
return &nodeInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PersistentVolumes returns a PersistentVolumeInformer.
|
||||||
|
func (v *version) PersistentVolumes() PersistentVolumeInformer {
|
||||||
|
return &persistentVolumeInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PersistentVolumeClaims returns a PersistentVolumeClaimInformer.
|
||||||
|
func (v *version) PersistentVolumeClaims() PersistentVolumeClaimInformer {
|
||||||
|
return &persistentVolumeClaimInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pods returns a PodInformer.
|
||||||
|
func (v *version) Pods() PodInformer {
|
||||||
|
return &podInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodTemplates returns a PodTemplateInformer.
|
||||||
|
func (v *version) PodTemplates() PodTemplateInformer {
|
||||||
|
return &podTemplateInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReplicationControllers returns a ReplicationControllerInformer.
|
||||||
|
func (v *version) ReplicationControllers() ReplicationControllerInformer {
|
||||||
|
return &replicationControllerInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResourceQuotas returns a ResourceQuotaInformer.
|
||||||
|
func (v *version) ResourceQuotas() ResourceQuotaInformer {
|
||||||
|
return &resourceQuotaInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Secrets returns a SecretInformer.
|
||||||
|
func (v *version) Secrets() SecretInformer {
|
||||||
|
return &secretInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Services returns a ServiceInformer.
|
||||||
|
func (v *version) Services() ServiceInformer {
|
||||||
|
return &serviceInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServiceAccounts returns a ServiceAccountInformer.
|
||||||
|
func (v *version) ServiceAccounts() ServiceAccountInformer {
|
||||||
|
return &serviceAccountInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/core/v1/limitrange.go
Normal file
68
informers/core/v1/limitrange.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LimitRangeInformer provides access to a shared informer and lister for
|
||||||
|
// LimitRanges.
|
||||||
|
type LimitRangeInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.LimitRangeLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type limitRangeInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newLimitRangeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.LimitRange{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *limitRangeInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.LimitRange{}, newLimitRangeInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *limitRangeInformer) Lister() v1.LimitRangeLister {
|
||||||
|
return v1.NewLimitRangeLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/namespace.go
Normal file
68
informers/core/v1/namespace.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NamespaceInformer provides access to a shared informer and lister for
|
||||||
|
// Namespaces.
|
||||||
|
type NamespaceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.NamespaceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type namespaceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Namespaces().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Namespaces().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Namespace{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *namespaceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Namespace{}, newNamespaceInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *namespaceInformer) Lister() v1.NamespaceLister {
|
||||||
|
return v1.NewNamespaceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/node.go
Normal file
68
informers/core/v1/node.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodeInformer provides access to a shared informer and lister for
|
||||||
|
// Nodes.
|
||||||
|
type NodeInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.NodeLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type nodeInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Nodes().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Nodes().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Node{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *nodeInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Node{}, newNodeInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *nodeInformer) Lister() v1.NodeLister {
|
||||||
|
return v1.NewNodeLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/persistentvolume.go
Normal file
68
informers/core/v1/persistentvolume.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PersistentVolumeInformer provides access to a shared informer and lister for
|
||||||
|
// PersistentVolumes.
|
||||||
|
type PersistentVolumeInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.PersistentVolumeLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type persistentVolumeInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().PersistentVolumes().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().PersistentVolumes().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.PersistentVolume{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *persistentVolumeInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.PersistentVolume{}, newPersistentVolumeInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *persistentVolumeInformer) Lister() v1.PersistentVolumeLister {
|
||||||
|
return v1.NewPersistentVolumeLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/persistentvolumeclaim.go
Normal file
68
informers/core/v1/persistentvolumeclaim.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PersistentVolumeClaimInformer provides access to a shared informer and lister for
|
||||||
|
// PersistentVolumeClaims.
|
||||||
|
type PersistentVolumeClaimInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.PersistentVolumeClaimLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type persistentVolumeClaimInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPersistentVolumeClaimInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.PersistentVolumeClaim{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.PersistentVolumeClaim{}, newPersistentVolumeClaimInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister {
|
||||||
|
return v1.NewPersistentVolumeClaimLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/pod.go
Normal file
68
informers/core/v1/pod.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodInformer provides access to a shared informer and lister for
|
||||||
|
// Pods.
|
||||||
|
type PodInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.PodLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type podInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPodInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Pods(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Pods(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Pod{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Pod{}, newPodInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podInformer) Lister() v1.PodLister {
|
||||||
|
return v1.NewPodLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/podtemplate.go
Normal file
68
informers/core/v1/podtemplate.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodTemplateInformer provides access to a shared informer and lister for
|
||||||
|
// PodTemplates.
|
||||||
|
type PodTemplateInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.PodTemplateLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type podTemplateInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPodTemplateInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.PodTemplate{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podTemplateInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.PodTemplate{}, newPodTemplateInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podTemplateInformer) Lister() v1.PodTemplateLister {
|
||||||
|
return v1.NewPodTemplateLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/replicationcontroller.go
Normal file
68
informers/core/v1/replicationcontroller.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReplicationControllerInformer provides access to a shared informer and lister for
|
||||||
|
// ReplicationControllers.
|
||||||
|
type ReplicationControllerInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ReplicationControllerLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type replicationControllerInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newReplicationControllerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.ReplicationController{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.ReplicationController{}, newReplicationControllerInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *replicationControllerInformer) Lister() v1.ReplicationControllerLister {
|
||||||
|
return v1.NewReplicationControllerLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/resourcequota.go
Normal file
68
informers/core/v1/resourcequota.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResourceQuotaInformer provides access to a shared informer and lister for
|
||||||
|
// ResourceQuotas.
|
||||||
|
type ResourceQuotaInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ResourceQuotaLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type resourceQuotaInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newResourceQuotaInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.ResourceQuota{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *resourceQuotaInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.ResourceQuota{}, newResourceQuotaInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *resourceQuotaInformer) Lister() v1.ResourceQuotaLister {
|
||||||
|
return v1.NewResourceQuotaLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/secret.go
Normal file
68
informers/core/v1/secret.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SecretInformer provides access to a shared informer and lister for
|
||||||
|
// Secrets.
|
||||||
|
type SecretInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.SecretLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type secretInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newSecretInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Secrets(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Secrets(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Secret{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *secretInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Secret{}, newSecretInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *secretInformer) Lister() v1.SecretLister {
|
||||||
|
return v1.NewSecretLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/service.go
Normal file
68
informers/core/v1/service.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ServiceInformer provides access to a shared informer and lister for
|
||||||
|
// Services.
|
||||||
|
type ServiceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ServiceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type serviceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newServiceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().Services(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().Services(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.Service{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *serviceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.Service{}, newServiceInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *serviceInformer) Lister() v1.ServiceLister {
|
||||||
|
return v1.NewServiceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/core/v1/serviceaccount.go
Normal file
68
informers/core/v1/serviceaccount.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1 "k8s.io/client-go/listers/core/v1"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ServiceAccountInformer provides access to a shared informer and lister for
|
||||||
|
// ServiceAccounts.
|
||||||
|
type ServiceAccountInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.ServiceAccountLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type serviceAccountInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newServiceAccountInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&api_v1.ServiceAccount{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&api_v1.ServiceAccount{}, newServiceAccountInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *serviceAccountInformer) Lister() v1.ServiceAccountLister {
|
||||||
|
return v1.NewServiceAccountLister(f.Informer().GetIndexer())
|
||||||
|
}
|
44
informers/extensions/interface.go
Normal file
44
informers/extensions/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package extensions
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/client-go/informers/extensions/v1beta1"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
68
informers/extensions/v1beta1/daemonset.go
Normal file
68
informers/extensions/v1beta1/daemonset.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DaemonSetInformer provides access to a shared informer and lister for
|
||||||
|
// DaemonSets.
|
||||||
|
type DaemonSetInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.DaemonSetLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type daemonSetInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newDaemonSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().DaemonSets(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().DaemonSets(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.DaemonSet{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *daemonSetInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.DaemonSet{}, newDaemonSetInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *daemonSetInformer) Lister() v1beta1.DaemonSetLister {
|
||||||
|
return v1beta1.NewDaemonSetLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/extensions/v1beta1/deployment.go
Normal file
68
informers/extensions/v1beta1/deployment.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeploymentInformer provides access to a shared informer and lister for
|
||||||
|
// Deployments.
|
||||||
|
type DeploymentInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.DeploymentLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type deploymentInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newDeploymentInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().Deployments(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().Deployments(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.Deployment{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *deploymentInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.Deployment{}, newDeploymentInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *deploymentInformer) Lister() v1beta1.DeploymentLister {
|
||||||
|
return v1beta1.NewDeploymentLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/extensions/v1beta1/ingress.go
Normal file
68
informers/extensions/v1beta1/ingress.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IngressInformer provides access to a shared informer and lister for
|
||||||
|
// Ingresses.
|
||||||
|
type IngressInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.IngressLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type ingressInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newIngressInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().Ingresses(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().Ingresses(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.Ingress{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *ingressInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.Ingress{}, newIngressInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *ingressInformer) Lister() v1beta1.IngressLister {
|
||||||
|
return v1beta1.NewIngressLister(f.Informer().GetIndexer())
|
||||||
|
}
|
78
informers/extensions/v1beta1/interface.go
Normal file
78
informers/extensions/v1beta1/interface.go
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// DaemonSets returns a DaemonSetInformer.
|
||||||
|
DaemonSets() DaemonSetInformer
|
||||||
|
// Deployments returns a DeploymentInformer.
|
||||||
|
Deployments() DeploymentInformer
|
||||||
|
// Ingresses returns a IngressInformer.
|
||||||
|
Ingresses() IngressInformer
|
||||||
|
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
||||||
|
PodSecurityPolicies() PodSecurityPolicyInformer
|
||||||
|
// ReplicaSets returns a ReplicaSetInformer.
|
||||||
|
ReplicaSets() ReplicaSetInformer
|
||||||
|
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||||
|
ThirdPartyResources() ThirdPartyResourceInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DaemonSets returns a DaemonSetInformer.
|
||||||
|
func (v *version) DaemonSets() DaemonSetInformer {
|
||||||
|
return &daemonSetInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deployments returns a DeploymentInformer.
|
||||||
|
func (v *version) Deployments() DeploymentInformer {
|
||||||
|
return &deploymentInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ingresses returns a IngressInformer.
|
||||||
|
func (v *version) Ingresses() IngressInformer {
|
||||||
|
return &ingressInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
||||||
|
func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
|
||||||
|
return &podSecurityPolicyInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReplicaSets returns a ReplicaSetInformer.
|
||||||
|
func (v *version) ReplicaSets() ReplicaSetInformer {
|
||||||
|
return &replicaSetInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||||
|
func (v *version) ThirdPartyResources() ThirdPartyResourceInformer {
|
||||||
|
return &thirdPartyResourceInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/extensions/v1beta1/podsecuritypolicy.go
Normal file
68
informers/extensions/v1beta1/podsecuritypolicy.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodSecurityPolicyInformer provides access to a shared informer and lister for
|
||||||
|
// PodSecurityPolicies.
|
||||||
|
type PodSecurityPolicyInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.PodSecurityPolicyLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type podSecurityPolicyInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().PodSecurityPolicies().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.PodSecurityPolicy{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.PodSecurityPolicy{}, newPodSecurityPolicyInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
|
||||||
|
return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/extensions/v1beta1/replicaset.go
Normal file
68
informers/extensions/v1beta1/replicaset.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReplicaSetInformer provides access to a shared informer and lister for
|
||||||
|
// ReplicaSets.
|
||||||
|
type ReplicaSetInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.ReplicaSetLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type replicaSetInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newReplicaSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().ReplicaSets(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().ReplicaSets(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.ReplicaSet{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *replicaSetInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.ReplicaSet{}, newReplicaSetInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *replicaSetInformer) Lister() v1beta1.ReplicaSetLister {
|
||||||
|
return v1beta1.NewReplicaSetLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/extensions/v1beta1/thirdpartyresource.go
Normal file
68
informers/extensions/v1beta1/thirdpartyresource.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ThirdPartyResourceInformer provides access to a shared informer and lister for
|
||||||
|
// ThirdPartyResources.
|
||||||
|
type ThirdPartyResourceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.ThirdPartyResourceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type thirdPartyResourceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.ExtensionsV1beta1().ThirdPartyResources().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.ExtensionsV1beta1().ThirdPartyResources().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&extensions_v1beta1.ThirdPartyResource{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&extensions_v1beta1.ThirdPartyResource{}, newThirdPartyResourceInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *thirdPartyResourceInformer) Lister() v1beta1.ThirdPartyResourceLister {
|
||||||
|
return v1beta1.NewThirdPartyResourceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
143
informers/factory.go
Normal file
143
informers/factory.go
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package informers
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
apps "k8s.io/client-go/informers/apps"
|
||||||
|
autoscaling "k8s.io/client-go/informers/autoscaling"
|
||||||
|
batch "k8s.io/client-go/informers/batch"
|
||||||
|
certificates "k8s.io/client-go/informers/certificates"
|
||||||
|
core "k8s.io/client-go/informers/core"
|
||||||
|
extensions "k8s.io/client-go/informers/extensions"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
policy "k8s.io/client-go/informers/policy"
|
||||||
|
rbac "k8s.io/client-go/informers/rbac"
|
||||||
|
storage "k8s.io/client-go/informers/storage"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type sharedInformerFactory struct {
|
||||||
|
client kubernetes.Interface
|
||||||
|
lock sync.Mutex
|
||||||
|
defaultResync time.Duration
|
||||||
|
|
||||||
|
informers map[reflect.Type]cache.SharedIndexInformer
|
||||||
|
// startedInformers is used for tracking which informers have been started.
|
||||||
|
// This allows Start() to be called multiple times safely.
|
||||||
|
startedInformers map[reflect.Type]bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
||||||
|
func NewSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||||
|
return &sharedInformerFactory{
|
||||||
|
client: client,
|
||||||
|
defaultResync: defaultResync,
|
||||||
|
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||||
|
startedInformers: make(map[reflect.Type]bool),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start initializes all requested informers.
|
||||||
|
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
for informerType, informer := range f.informers {
|
||||||
|
if !f.startedInformers[informerType] {
|
||||||
|
go informer.Run(stopCh)
|
||||||
|
f.startedInformers[informerType] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||||
|
// client.
|
||||||
|
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||||
|
f.lock.Lock()
|
||||||
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
informerType := reflect.TypeOf(obj)
|
||||||
|
informer, exists := f.informers[informerType]
|
||||||
|
if exists {
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
informer = newFunc(f.client, f.defaultResync)
|
||||||
|
f.informers[informerType] = informer
|
||||||
|
|
||||||
|
return informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// SharedInformerFactory provides shared informers for resources in all known
|
||||||
|
// API group versions.
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||||
|
|
||||||
|
Apps() apps.Interface
|
||||||
|
Autoscaling() autoscaling.Interface
|
||||||
|
Batch() batch.Interface
|
||||||
|
Certificates() certificates.Interface
|
||||||
|
Core() core.Interface
|
||||||
|
Extensions() extensions.Interface
|
||||||
|
Policy() policy.Interface
|
||||||
|
Rbac() rbac.Interface
|
||||||
|
Storage() storage.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Apps() apps.Interface {
|
||||||
|
return apps.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface {
|
||||||
|
return autoscaling.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Batch() batch.Interface {
|
||||||
|
return batch.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Certificates() certificates.Interface {
|
||||||
|
return certificates.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Core() core.Interface {
|
||||||
|
return core.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Extensions() extensions.Interface {
|
||||||
|
return extensions.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Policy() policy.Interface {
|
||||||
|
return policy.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Rbac() rbac.Interface {
|
||||||
|
return rbac.New(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Storage() storage.Interface {
|
||||||
|
return storage.New(f)
|
||||||
|
}
|
170
informers/generic.go
Normal file
170
informers/generic.go
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package informers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||||
|
v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||||
|
v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
|
||||||
|
v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
|
||||||
|
batch_v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||||
|
batch_v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||||
|
certificates_v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
|
||||||
|
extensions_v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
|
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
|
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
||||||
|
// sharedInformers based on type
|
||||||
|
type GenericInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() cache.GenericLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type genericInformer struct {
|
||||||
|
informer cache.SharedIndexInformer
|
||||||
|
resource schema.GroupResource
|
||||||
|
}
|
||||||
|
|
||||||
|
// Informer returns the SharedIndexInformer.
|
||||||
|
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.informer
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lister returns the GenericLister.
|
||||||
|
func (f *genericInformer) Lister() cache.GenericLister {
|
||||||
|
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ForResource gives generic access to a shared informer of the matching type
|
||||||
|
// TODO extend this to unknown resources with a client pool
|
||||||
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||||
|
switch resource {
|
||||||
|
// Group=Apps, Version=V1beta1
|
||||||
|
case v1beta1.SchemeGroupVersion.WithResource("statefulsets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Autoscaling, Version=V1
|
||||||
|
case v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Autoscaling, Version=V2alpha1
|
||||||
|
case v2alpha1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2alpha1().HorizontalPodAutoscalers().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Batch, Version=V1
|
||||||
|
case batch_v1.SchemeGroupVersion.WithResource("jobs"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Batch, Version=V2alpha1
|
||||||
|
case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
|
||||||
|
case batch_v2alpha1.SchemeGroupVersion.WithResource("jobs"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().Jobs().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Certificates, Version=V1beta1
|
||||||
|
case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Core, Version=V1
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("componentstatuses"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ComponentStatuses().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("configmaps"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ConfigMaps().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("endpoints"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Endpoints().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("events"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Events().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("limitranges"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().LimitRanges().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("namespaces"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Namespaces().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("nodes"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Nodes().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("persistentvolumes"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumes().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("persistentvolumeclaims"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumeClaims().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("pods"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Pods().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("podtemplates"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PodTemplates().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("replicationcontrollers"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ReplicationControllers().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("resourcequotas"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ResourceQuotas().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("secrets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Secrets().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("services"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Services().Informer()}, nil
|
||||||
|
case api_v1.SchemeGroupVersion.WithResource("serviceaccounts"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Extensions, Version=V1beta1
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("deployments"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Deployments().Informer()}, nil
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("ingresses"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("replicasets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
|
||||||
|
case extensions_v1beta1.SchemeGroupVersion.WithResource("thirdpartyresources"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ThirdPartyResources().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Policy, Version=V1beta1
|
||||||
|
case policy_v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Rbac, Version=V1alpha1
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("clusterroles"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoles().Informer()}, nil
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoleBindings().Informer()}, nil
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("roles"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().Roles().Informer()}, nil
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("rolebindings"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().RoleBindings().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Rbac, Version=V1beta1
|
||||||
|
case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterroles"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoles().Informer()}, nil
|
||||||
|
case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoleBindings().Informer()}, nil
|
||||||
|
case rbac_v1beta1.SchemeGroupVersion.WithResource("roles"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().Roles().Informer()}, nil
|
||||||
|
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=Storage, Version=V1beta1
|
||||||
|
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||||
|
}
|
34
informers/internalinterfaces/factory_interfaces.go
Normal file
34
informers/internalinterfaces/factory_interfaces.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package internalinterfaces
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer
|
||||||
|
|
||||||
|
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||||
|
type SharedInformerFactory interface {
|
||||||
|
Start(stopCh <-chan struct{})
|
||||||
|
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||||
|
}
|
44
informers/policy/interface.go
Normal file
44
informers/policy/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package policy
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
v1beta1 "k8s.io/client-go/informers/policy/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
43
informers/policy/v1beta1/interface.go
Normal file
43
informers/policy/v1beta1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
|
||||||
|
PodDisruptionBudgets() PodDisruptionBudgetInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
|
||||||
|
func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer {
|
||||||
|
return &podDisruptionBudgetInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/policy/v1beta1/poddisruptionbudget.go
Normal file
68
informers/policy/v1beta1/poddisruptionbudget.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/policy/v1beta1"
|
||||||
|
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodDisruptionBudgetInformer provides access to a shared informer and lister for
|
||||||
|
// PodDisruptionBudgets.
|
||||||
|
type PodDisruptionBudgetInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.PodDisruptionBudgetLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type podDisruptionBudgetInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPodDisruptionBudgetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.PolicyV1beta1().PodDisruptionBudgets(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.PolicyV1beta1().PodDisruptionBudgets(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&policy_v1beta1.PodDisruptionBudget{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&policy_v1beta1.PodDisruptionBudget{}, newPodDisruptionBudgetInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *podDisruptionBudgetInformer) Lister() v1beta1.PodDisruptionBudgetLister {
|
||||||
|
return v1beta1.NewPodDisruptionBudgetLister(f.Informer().GetIndexer())
|
||||||
|
}
|
52
informers/rbac/interface.go
Normal file
52
informers/rbac/interface.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package rbac
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
v1alpha1 "k8s.io/client-go/informers/rbac/v1alpha1"
|
||||||
|
v1beta1 "k8s.io/client-go/informers/rbac/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||||
|
V1alpha1() v1alpha1.Interface
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1alpha1 returns a new v1alpha1.Interface.
|
||||||
|
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||||
|
return v1alpha1.New(g.SharedInformerFactory)
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
68
informers/rbac/v1alpha1/clusterrole.go
Normal file
68
informers/rbac/v1alpha1/clusterrole.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||||
|
rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterRoleInformer provides access to a shared informer and lister for
|
||||||
|
// ClusterRoles.
|
||||||
|
type ClusterRoleInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.ClusterRoleLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type clusterRoleInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1alpha1().ClusterRoles().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1alpha1().ClusterRoles().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1alpha1.ClusterRole{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1alpha1.ClusterRole{}, newClusterRoleInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleInformer) Lister() v1alpha1.ClusterRoleLister {
|
||||||
|
return v1alpha1.NewClusterRoleLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/rbac/v1alpha1/clusterrolebinding.go
Normal file
68
informers/rbac/v1alpha1/clusterrolebinding.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||||
|
rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterRoleBindingInformer provides access to a shared informer and lister for
|
||||||
|
// ClusterRoleBindings.
|
||||||
|
type ClusterRoleBindingInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.ClusterRoleBindingLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type clusterRoleBindingInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1alpha1().ClusterRoleBindings().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1alpha1().ClusterRoleBindings().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1alpha1.ClusterRoleBinding{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1alpha1.ClusterRoleBinding{}, newClusterRoleBindingInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleBindingInformer) Lister() v1alpha1.ClusterRoleBindingLister {
|
||||||
|
return v1alpha1.NewClusterRoleBindingLister(f.Informer().GetIndexer())
|
||||||
|
}
|
64
informers/rbac/v1alpha1/interface.go
Normal file
64
informers/rbac/v1alpha1/interface.go
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// ClusterRoles returns a ClusterRoleInformer.
|
||||||
|
ClusterRoles() ClusterRoleInformer
|
||||||
|
// ClusterRoleBindings returns a ClusterRoleBindingInformer.
|
||||||
|
ClusterRoleBindings() ClusterRoleBindingInformer
|
||||||
|
// Roles returns a RoleInformer.
|
||||||
|
Roles() RoleInformer
|
||||||
|
// RoleBindings returns a RoleBindingInformer.
|
||||||
|
RoleBindings() RoleBindingInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterRoles returns a ClusterRoleInformer.
|
||||||
|
func (v *version) ClusterRoles() ClusterRoleInformer {
|
||||||
|
return &clusterRoleInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterRoleBindings returns a ClusterRoleBindingInformer.
|
||||||
|
func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer {
|
||||||
|
return &clusterRoleBindingInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Roles returns a RoleInformer.
|
||||||
|
func (v *version) Roles() RoleInformer {
|
||||||
|
return &roleInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RoleBindings returns a RoleBindingInformer.
|
||||||
|
func (v *version) RoleBindings() RoleBindingInformer {
|
||||||
|
return &roleBindingInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/rbac/v1alpha1/role.go
Normal file
68
informers/rbac/v1alpha1/role.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||||
|
rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleInformer provides access to a shared informer and lister for
|
||||||
|
// Roles.
|
||||||
|
type RoleInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.RoleLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type roleInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1alpha1().Roles(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1alpha1().Roles(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1alpha1.Role{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1alpha1.Role{}, newRoleInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleInformer) Lister() v1alpha1.RoleLister {
|
||||||
|
return v1alpha1.NewRoleLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/rbac/v1alpha1/rolebinding.go
Normal file
68
informers/rbac/v1alpha1/rolebinding.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
|
||||||
|
rbac_v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleBindingInformer provides access to a shared informer and lister for
|
||||||
|
// RoleBindings.
|
||||||
|
type RoleBindingInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.RoleBindingLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type roleBindingInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1alpha1().RoleBindings(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1alpha1().RoleBindings(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1alpha1.RoleBinding{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleBindingInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1alpha1.RoleBinding{}, newRoleBindingInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleBindingInformer) Lister() v1alpha1.RoleBindingLister {
|
||||||
|
return v1alpha1.NewRoleBindingLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/rbac/v1beta1/clusterrole.go
Normal file
68
informers/rbac/v1beta1/clusterrole.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||||
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterRoleInformer provides access to a shared informer and lister for
|
||||||
|
// ClusterRoles.
|
||||||
|
type ClusterRoleInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.ClusterRoleLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type clusterRoleInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1beta1().ClusterRoles().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1beta1().ClusterRoles().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1beta1.ClusterRole{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1beta1.ClusterRole{}, newClusterRoleInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleInformer) Lister() v1beta1.ClusterRoleLister {
|
||||||
|
return v1beta1.NewClusterRoleLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/rbac/v1beta1/clusterrolebinding.go
Normal file
68
informers/rbac/v1beta1/clusterrolebinding.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||||
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClusterRoleBindingInformer provides access to a shared informer and lister for
|
||||||
|
// ClusterRoleBindings.
|
||||||
|
type ClusterRoleBindingInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.ClusterRoleBindingLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type clusterRoleBindingInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1beta1().ClusterRoleBindings().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1beta1().ClusterRoleBindings().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1beta1.ClusterRoleBinding{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1beta1.ClusterRoleBinding{}, newClusterRoleBindingInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *clusterRoleBindingInformer) Lister() v1beta1.ClusterRoleBindingLister {
|
||||||
|
return v1beta1.NewClusterRoleBindingLister(f.Informer().GetIndexer())
|
||||||
|
}
|
64
informers/rbac/v1beta1/interface.go
Normal file
64
informers/rbac/v1beta1/interface.go
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// ClusterRoles returns a ClusterRoleInformer.
|
||||||
|
ClusterRoles() ClusterRoleInformer
|
||||||
|
// ClusterRoleBindings returns a ClusterRoleBindingInformer.
|
||||||
|
ClusterRoleBindings() ClusterRoleBindingInformer
|
||||||
|
// Roles returns a RoleInformer.
|
||||||
|
Roles() RoleInformer
|
||||||
|
// RoleBindings returns a RoleBindingInformer.
|
||||||
|
RoleBindings() RoleBindingInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterRoles returns a ClusterRoleInformer.
|
||||||
|
func (v *version) ClusterRoles() ClusterRoleInformer {
|
||||||
|
return &clusterRoleInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClusterRoleBindings returns a ClusterRoleBindingInformer.
|
||||||
|
func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer {
|
||||||
|
return &clusterRoleBindingInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Roles returns a RoleInformer.
|
||||||
|
func (v *version) Roles() RoleInformer {
|
||||||
|
return &roleInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RoleBindings returns a RoleBindingInformer.
|
||||||
|
func (v *version) RoleBindings() RoleBindingInformer {
|
||||||
|
return &roleBindingInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/rbac/v1beta1/role.go
Normal file
68
informers/rbac/v1beta1/role.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||||
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleInformer provides access to a shared informer and lister for
|
||||||
|
// Roles.
|
||||||
|
type RoleInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.RoleLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type roleInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1beta1().Roles(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1beta1().Roles(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1beta1.Role{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1beta1.Role{}, newRoleInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleInformer) Lister() v1beta1.RoleLister {
|
||||||
|
return v1beta1.NewRoleLister(f.Informer().GetIndexer())
|
||||||
|
}
|
68
informers/rbac/v1beta1/rolebinding.go
Normal file
68
informers/rbac/v1beta1/rolebinding.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
|
||||||
|
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RoleBindingInformer provides access to a shared informer and lister for
|
||||||
|
// RoleBindings.
|
||||||
|
type RoleBindingInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.RoleBindingLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type roleBindingInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&rbac_v1beta1.RoleBinding{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleBindingInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&rbac_v1beta1.RoleBinding{}, newRoleBindingInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *roleBindingInformer) Lister() v1beta1.RoleBindingLister {
|
||||||
|
return v1beta1.NewRoleBindingLister(f.Informer().GetIndexer())
|
||||||
|
}
|
44
informers/storage/interface.go
Normal file
44
informers/storage/interface.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package storage
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
v1beta1 "k8s.io/client-go/informers/storage/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &group{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.SharedInformerFactory)
|
||||||
|
}
|
43
informers/storage/v1beta1/interface.go
Normal file
43
informers/storage/v1beta1/interface.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// StorageClasses returns a StorageClassInformer.
|
||||||
|
StorageClasses() StorageClassInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory) Interface {
|
||||||
|
return &version{f}
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageClasses returns a StorageClassInformer.
|
||||||
|
func (v *version) StorageClasses() StorageClassInformer {
|
||||||
|
return &storageClassInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
68
informers/storage/v1beta1/storageclass.go
Normal file
68
informers/storage/v1beta1/storageclass.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
|
||||||
|
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StorageClassInformer provides access to a shared informer and lister for
|
||||||
|
// StorageClasses.
|
||||||
|
type StorageClassInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.StorageClassLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type storageClassInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
func newStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
sharedIndexInformer := cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.StorageV1beta1().StorageClasses().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.StorageV1beta1().StorageClasses().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&storage_v1beta1.StorageClass{},
|
||||||
|
resyncPeriod,
|
||||||
|
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
||||||
|
)
|
||||||
|
|
||||||
|
return sharedIndexInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, newStorageClassInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *storageClassInformer) Lister() v1beta1.StorageClassLister {
|
||||||
|
return v1beta1.NewStorageClassLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -20,9 +20,12 @@ import (
|
|||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
discovery "k8s.io/client-go/discovery"
|
discovery "k8s.io/client-go/discovery"
|
||||||
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
||||||
|
v1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
||||||
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
||||||
|
v1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
||||||
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
||||||
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
||||||
|
v2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
||||||
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||||
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
||||||
v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||||
@ -32,7 +35,6 @@ import (
|
|||||||
v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
||||||
v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
||||||
v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
"k8s.io/client-go/util/flowcontrol"
|
"k8s.io/client-go/util/flowcontrol"
|
||||||
)
|
)
|
||||||
@ -45,15 +47,21 @@ type Interface interface {
|
|||||||
AppsV1beta1() v1beta1apps.AppsV1beta1Interface
|
AppsV1beta1() v1beta1apps.AppsV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Apps() v1beta1apps.AppsV1beta1Interface
|
Apps() v1beta1apps.AppsV1beta1Interface
|
||||||
|
AuthenticationV1() v1authentication.AuthenticationV1Interface
|
||||||
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
|
Authentication() v1authentication.AuthenticationV1Interface
|
||||||
AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface
|
AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface
|
||||||
|
|
||||||
|
AuthorizationV1() v1authorization.AuthorizationV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Authentication() v1beta1authentication.AuthenticationV1beta1Interface
|
Authorization() v1authorization.AuthorizationV1Interface
|
||||||
AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface
|
AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
|
||||||
Authorization() v1beta1authorization.AuthorizationV1beta1Interface
|
|
||||||
AutoscalingV1() v1autoscaling.AutoscalingV1Interface
|
AutoscalingV1() v1autoscaling.AutoscalingV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Autoscaling() v1autoscaling.AutoscalingV1Interface
|
Autoscaling() v1autoscaling.AutoscalingV1Interface
|
||||||
|
AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface
|
||||||
|
|
||||||
BatchV1() v1batch.BatchV1Interface
|
BatchV1() v1batch.BatchV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Batch() v1batch.BatchV1Interface
|
Batch() v1batch.BatchV1Interface
|
||||||
@ -84,9 +92,12 @@ type Clientset struct {
|
|||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*v1core.CoreV1Client
|
*v1core.CoreV1Client
|
||||||
*v1beta1apps.AppsV1beta1Client
|
*v1beta1apps.AppsV1beta1Client
|
||||||
|
*v1authentication.AuthenticationV1Client
|
||||||
*v1beta1authentication.AuthenticationV1beta1Client
|
*v1beta1authentication.AuthenticationV1beta1Client
|
||||||
|
*v1authorization.AuthorizationV1Client
|
||||||
*v1beta1authorization.AuthorizationV1beta1Client
|
*v1beta1authorization.AuthorizationV1beta1Client
|
||||||
*v1autoscaling.AutoscalingV1Client
|
*v1autoscaling.AutoscalingV1Client
|
||||||
|
*v2alpha1autoscaling.AutoscalingV2alpha1Client
|
||||||
*v1batch.BatchV1Client
|
*v1batch.BatchV1Client
|
||||||
*v2alpha1batch.BatchV2alpha1Client
|
*v2alpha1batch.BatchV2alpha1Client
|
||||||
*v1beta1certificates.CertificatesV1beta1Client
|
*v1beta1certificates.CertificatesV1beta1Client
|
||||||
@ -131,6 +142,23 @@ func (c *Clientset) Apps() v1beta1apps.AppsV1beta1Interface {
|
|||||||
return c.AppsV1beta1Client
|
return c.AppsV1beta1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AuthenticationV1 retrieves the AuthenticationV1Client
|
||||||
|
func (c *Clientset) AuthenticationV1() v1authentication.AuthenticationV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AuthenticationV1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Authentication retrieves the default version of AuthenticationClient.
|
||||||
|
// Please explicitly pick a version.
|
||||||
|
func (c *Clientset) Authentication() v1authentication.AuthenticationV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AuthenticationV1Client
|
||||||
|
}
|
||||||
|
|
||||||
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
||||||
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
@ -139,26 +167,25 @@ func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.Authentication
|
|||||||
return c.AuthenticationV1beta1Client
|
return c.AuthenticationV1beta1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Authentication retrieves the default version of AuthenticationClient.
|
// AuthorizationV1 retrieves the AuthorizationV1Client
|
||||||
// Please explicitly pick a version.
|
func (c *Clientset) AuthorizationV1() v1authorization.AuthorizationV1Interface {
|
||||||
func (c *Clientset) Authentication() v1beta1authentication.AuthenticationV1beta1Interface {
|
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return c.AuthenticationV1beta1Client
|
return c.AuthorizationV1Client
|
||||||
}
|
|
||||||
|
|
||||||
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
|
||||||
func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface {
|
|
||||||
if c == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return c.AuthorizationV1beta1Client
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Authorization retrieves the default version of AuthorizationClient.
|
// Deprecated: Authorization retrieves the default version of AuthorizationClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Authorization() v1beta1authorization.AuthorizationV1beta1Interface {
|
func (c *Clientset) Authorization() v1authorization.AuthorizationV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AuthorizationV1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
||||||
|
func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1beta1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -182,6 +209,14 @@ func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
|||||||
return c.AutoscalingV1Client
|
return c.AutoscalingV1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
||||||
|
func (c *Clientset) AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AutoscalingV2alpha1Client
|
||||||
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
@ -324,10 +359,18 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.AuthenticationV1Client, err = v1authentication.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.AuthenticationV1beta1Client, err = v1beta1authentication.NewForConfig(&configShallowCopy)
|
cs.AuthenticationV1beta1Client, err = v1beta1authentication.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.AuthorizationV1Client, err = v1authorization.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.AuthorizationV1beta1Client, err = v1beta1authorization.NewForConfig(&configShallowCopy)
|
cs.AuthorizationV1beta1Client, err = v1beta1authorization.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -336,6 +379,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.AutoscalingV2alpha1Client, err = v2alpha1autoscaling.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
|
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -383,9 +430,12 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
||||||
cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c)
|
cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c)
|
||||||
|
cs.AuthenticationV1Client = v1authentication.NewForConfigOrDie(c)
|
||||||
cs.AuthenticationV1beta1Client = v1beta1authentication.NewForConfigOrDie(c)
|
cs.AuthenticationV1beta1Client = v1beta1authentication.NewForConfigOrDie(c)
|
||||||
|
cs.AuthorizationV1Client = v1authorization.NewForConfigOrDie(c)
|
||||||
cs.AuthorizationV1beta1Client = v1beta1authorization.NewForConfigOrDie(c)
|
cs.AuthorizationV1beta1Client = v1beta1authorization.NewForConfigOrDie(c)
|
||||||
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
|
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
|
||||||
|
cs.AutoscalingV2alpha1Client = v2alpha1autoscaling.NewForConfigOrDie(c)
|
||||||
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
||||||
cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c)
|
cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c)
|
||||||
cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c)
|
cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c)
|
||||||
@ -404,9 +454,12 @@ func New(c rest.Interface) *Clientset {
|
|||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.New(c)
|
cs.CoreV1Client = v1core.New(c)
|
||||||
cs.AppsV1beta1Client = v1beta1apps.New(c)
|
cs.AppsV1beta1Client = v1beta1apps.New(c)
|
||||||
|
cs.AuthenticationV1Client = v1authentication.New(c)
|
||||||
cs.AuthenticationV1beta1Client = v1beta1authentication.New(c)
|
cs.AuthenticationV1beta1Client = v1beta1authentication.New(c)
|
||||||
|
cs.AuthorizationV1Client = v1authorization.New(c)
|
||||||
cs.AuthorizationV1beta1Client = v1beta1authorization.New(c)
|
cs.AuthorizationV1beta1Client = v1beta1authorization.New(c)
|
||||||
cs.AutoscalingV1Client = v1autoscaling.New(c)
|
cs.AutoscalingV1Client = v1autoscaling.New(c)
|
||||||
|
cs.AutoscalingV2alpha1Client = v2alpha1autoscaling.New(c)
|
||||||
cs.BatchV1Client = v1batch.New(c)
|
cs.BatchV1Client = v1batch.New(c)
|
||||||
cs.BatchV2alpha1Client = v2alpha1batch.New(c)
|
cs.BatchV2alpha1Client = v2alpha1batch.New(c)
|
||||||
cs.CertificatesV1beta1Client = v1beta1certificates.New(c)
|
cs.CertificatesV1beta1Client = v1beta1certificates.New(c)
|
||||||
|
@ -24,12 +24,18 @@ import (
|
|||||||
kubernetes "k8s.io/client-go/kubernetes"
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
v1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
|
||||||
fakev1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
|
fakev1beta1apps "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
|
||||||
|
v1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
||||||
|
fakev1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1/fake"
|
||||||
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
v1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
|
||||||
fakev1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake"
|
fakev1beta1authentication "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake"
|
||||||
|
v1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
||||||
|
fakev1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1/fake"
|
||||||
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
v1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
|
||||||
fakev1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
|
fakev1beta1authorization "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
|
||||||
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
|
||||||
fakev1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
|
fakev1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
|
||||||
|
v2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
|
||||||
|
fakev2alpha1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake"
|
||||||
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
v1batch "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||||
fakev1batch "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
fakev1batch "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
||||||
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
||||||
@ -105,14 +111,29 @@ func (c *Clientset) Apps() v1beta1apps.AppsV1beta1Interface {
|
|||||||
return &fakev1beta1apps.FakeAppsV1beta1{Fake: &c.Fake}
|
return &fakev1beta1apps.FakeAppsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AuthenticationV1 retrieves the AuthenticationV1Client
|
||||||
|
func (c *Clientset) AuthenticationV1() v1authentication.AuthenticationV1Interface {
|
||||||
|
return &fakev1authentication.FakeAuthenticationV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Authentication retrieves the AuthenticationV1Client
|
||||||
|
func (c *Clientset) Authentication() v1authentication.AuthenticationV1Interface {
|
||||||
|
return &fakev1authentication.FakeAuthenticationV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
|
||||||
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
func (c *Clientset) AuthenticationV1beta1() v1beta1authentication.AuthenticationV1beta1Interface {
|
||||||
return &fakev1beta1authentication.FakeAuthenticationV1beta1{Fake: &c.Fake}
|
return &fakev1beta1authentication.FakeAuthenticationV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authentication retrieves the AuthenticationV1beta1Client
|
// AuthorizationV1 retrieves the AuthorizationV1Client
|
||||||
func (c *Clientset) Authentication() v1beta1authentication.AuthenticationV1beta1Interface {
|
func (c *Clientset) AuthorizationV1() v1authorization.AuthorizationV1Interface {
|
||||||
return &fakev1beta1authentication.FakeAuthenticationV1beta1{Fake: &c.Fake}
|
return &fakev1authorization.FakeAuthorizationV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Authorization retrieves the AuthorizationV1Client
|
||||||
|
func (c *Clientset) Authorization() v1authorization.AuthorizationV1Interface {
|
||||||
|
return &fakev1authorization.FakeAuthorizationV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
|
||||||
@ -120,11 +141,6 @@ func (c *Clientset) AuthorizationV1beta1() v1beta1authorization.AuthorizationV1b
|
|||||||
return &fakev1beta1authorization.FakeAuthorizationV1beta1{Fake: &c.Fake}
|
return &fakev1beta1authorization.FakeAuthorizationV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authorization retrieves the AuthorizationV1beta1Client
|
|
||||||
func (c *Clientset) Authorization() v1beta1authorization.AuthorizationV1beta1Interface {
|
|
||||||
return &fakev1beta1authorization.FakeAuthorizationV1beta1{Fake: &c.Fake}
|
|
||||||
}
|
|
||||||
|
|
||||||
// AutoscalingV1 retrieves the AutoscalingV1Client
|
// AutoscalingV1 retrieves the AutoscalingV1Client
|
||||||
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
||||||
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
@ -135,6 +151,11 @@ func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
|||||||
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
|
||||||
|
func (c *Clientset) AutoscalingV2alpha1() v2alpha1autoscaling.AutoscalingV2alpha1Interface {
|
||||||
|
return &fakev2alpha1autoscaling.FakeAutoscalingV2alpha1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
||||||
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
||||||
|
97
kubernetes/typed/authentication/v1/authentication_client.go
Normal file
97
kubernetes/typed/authentication/v1/authentication_client.go
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
api "k8s.io/client-go/pkg/api"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AuthenticationV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
TokenReviewsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group.
|
||||||
|
type AuthenticationV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface {
|
||||||
|
return newTokenReviews(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new AuthenticationV1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*AuthenticationV1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &AuthenticationV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new AuthenticationV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new AuthenticationV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *AuthenticationV1Client {
|
||||||
|
return &AuthenticationV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// if authentication.k8s.io/v1 is not enabled, return an error
|
||||||
|
if !api.Registry.IsEnabledVersion(gv) {
|
||||||
|
return fmt.Errorf("authentication.k8s.io/v1 is not enabled")
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
copyGroupVersion := gv
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *AuthenticationV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
20
kubernetes/typed/authentication/v1/doc.go
Normal file
20
kubernetes/typed/authentication/v1/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1
|
20
kubernetes/typed/authentication/v1/fake/doc.go
Normal file
20
kubernetes/typed/authentication/v1/fake/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeAuthenticationV1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAuthenticationV1) TokenReviews() v1.TokenReviewInterface {
|
||||||
|
return &FakeTokenReviews{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeAuthenticationV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
22
kubernetes/typed/authentication/v1/fake/fake_tokenreview.go
Normal file
22
kubernetes/typed/authentication/v1/fake/fake_tokenreview.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
// FakeTokenReviews implements TokenReviewInterface
|
||||||
|
type FakeTokenReviews struct {
|
||||||
|
Fake *FakeAuthenticationV1
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1"
|
||||||
|
core "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeTokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
|
||||||
|
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authenticationapi.SchemeGroupVersion.WithResource("tokenreviews"), tokenReview), &authenticationapi.TokenReview{})
|
||||||
|
return obj.(*authenticationapi.TokenReview), err
|
||||||
|
}
|
17
kubernetes/typed/authentication/v1/generated_expansion.go
Normal file
17
kubernetes/typed/authentication/v1/generated_expansion.go
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
44
kubernetes/typed/authentication/v1/tokenreview.go
Normal file
44
kubernetes/typed/authentication/v1/tokenreview.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TokenReviewsGetter has a method to return a TokenReviewInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type TokenReviewsGetter interface {
|
||||||
|
TokenReviews() TokenReviewInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// TokenReviewInterface has methods to work with TokenReview resources.
|
||||||
|
type TokenReviewInterface interface {
|
||||||
|
TokenReviewExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// tokenReviews implements TokenReviewInterface
|
||||||
|
type tokenReviews struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTokenReviews returns a TokenReviews
|
||||||
|
func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
|
||||||
|
return &tokenReviews{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
35
kubernetes/typed/authentication/v1/tokenreview_expansion.go
Normal file
35
kubernetes/typed/authentication/v1/tokenreview_expansion.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type TokenReviewExpansion interface {
|
||||||
|
Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
|
||||||
|
result = &authenticationapi.TokenReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("tokenreviews").
|
||||||
|
Body(tokenReview).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
107
kubernetes/typed/authorization/v1/authorization_client.go
Normal file
107
kubernetes/typed/authorization/v1/authorization_client.go
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
api "k8s.io/client-go/pkg/api"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AuthorizationV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
LocalSubjectAccessReviewsGetter
|
||||||
|
SelfSubjectAccessReviewsGetter
|
||||||
|
SubjectAccessReviewsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group.
|
||||||
|
type AuthorizationV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
|
||||||
|
return newLocalSubjectAccessReviews(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
|
||||||
|
return newSelfSubjectAccessReviews(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
|
||||||
|
return newSubjectAccessReviews(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new AuthorizationV1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*AuthorizationV1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &AuthorizationV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new AuthorizationV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new AuthorizationV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *AuthorizationV1Client {
|
||||||
|
return &AuthorizationV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// if authorization.k8s.io/v1 is not enabled, return an error
|
||||||
|
if !api.Registry.IsEnabledVersion(gv) {
|
||||||
|
return fmt.Errorf("authorization.k8s.io/v1 is not enabled")
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
copyGroupVersion := gv
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *AuthorizationV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
20
kubernetes/typed/authorization/v1/doc.go
Normal file
20
kubernetes/typed/authorization/v1/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1
|
20
kubernetes/typed/authorization/v1/fake/doc.go
Normal file
20
kubernetes/typed/authorization/v1/fake/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeAuthorizationV1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAuthorizationV1) LocalSubjectAccessReviews(namespace string) v1.LocalSubjectAccessReviewInterface {
|
||||||
|
return &FakeLocalSubjectAccessReviews{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAuthorizationV1) SelfSubjectAccessReviews() v1.SelfSubjectAccessReviewInterface {
|
||||||
|
return &FakeSelfSubjectAccessReviews{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAuthorizationV1) SubjectAccessReviews() v1.SubjectAccessReviewInterface {
|
||||||
|
return &FakeSubjectAccessReviews{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeAuthorizationV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
||||||
|
type FakeLocalSubjectAccessReviews struct {
|
||||||
|
Fake *FakeAuthorizationV1
|
||||||
|
ns string
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
core "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeLocalSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.Invokes(core.NewCreateAction(authorizationapi.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), c.ns, sar), &authorizationapi.SubjectAccessReview{})
|
||||||
|
return obj.(*authorizationapi.LocalSubjectAccessReview), err
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
||||||
|
type FakeSelfSubjectAccessReviews struct {
|
||||||
|
Fake *FakeAuthorizationV1
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
core "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeSelfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectaccessreviews"), sar), &authorizationapi.SelfSubjectAccessReview{})
|
||||||
|
return obj.(*authorizationapi.SelfSubjectAccessReview), err
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
||||||
|
type FakeSubjectAccessReviews struct {
|
||||||
|
Fake *FakeAuthorizationV1
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
core "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{})
|
||||||
|
return obj.(*authorizationapi.SubjectAccessReview), err
|
||||||
|
}
|
17
kubernetes/typed/authorization/v1/generated_expansion.go
Normal file
17
kubernetes/typed/authorization/v1/generated_expansion.go
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type LocalSubjectAccessReviewsGetter interface {
|
||||||
|
LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
|
||||||
|
type LocalSubjectAccessReviewInterface interface {
|
||||||
|
LocalSubjectAccessReviewExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
||||||
|
type localSubjectAccessReviews struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
|
||||||
|
func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews {
|
||||||
|
return &localSubjectAccessReviews{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type LocalSubjectAccessReviewExpansion interface {
|
||||||
|
Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
|
||||||
|
result = &authorizationapi.LocalSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("localsubjectaccessreviews").
|
||||||
|
Body(sar).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
44
kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
Normal file
44
kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type SelfSubjectAccessReviewsGetter interface {
|
||||||
|
SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
|
||||||
|
type SelfSubjectAccessReviewInterface interface {
|
||||||
|
SelfSubjectAccessReviewExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
||||||
|
type selfSubjectAccessReviews struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
|
||||||
|
func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews {
|
||||||
|
return &selfSubjectAccessReviews{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SelfSubjectAccessReviewExpansion interface {
|
||||||
|
Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
|
||||||
|
result = &authorizationapi.SelfSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("selfsubjectaccessreviews").
|
||||||
|
Body(sar).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user