mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
generated: update clients
This commit is contained in:
parent
41bd53866e
commit
65483a19ab
@ -17,6 +17,7 @@ go_library(
|
|||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/authentication/v1:go_default_library",
|
"//staging/src/k8s.io/api/authentication/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/authentication/v1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeTokenReviews implements TokenReviewInterface
|
// FakeTokenReviews implements TokenReviewInterface
|
||||||
type FakeTokenReviews struct {
|
type FakeTokenReviews struct {
|
||||||
Fake *FakeAuthenticationV1
|
Fake *FakeAuthenticationV1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1", Resource: "tokenreviews"}
|
||||||
|
|
||||||
|
var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||||
|
func (c *FakeTokenReviews) Create(tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.TokenReview), err
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/authentication/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type TokenReviewsGetter interface {
|
|||||||
|
|
||||||
// TokenReviewInterface has methods to work with TokenReview resources.
|
// TokenReviewInterface has methods to work with TokenReview resources.
|
||||||
type TokenReviewInterface interface {
|
type TokenReviewInterface interface {
|
||||||
|
Create(*v1.TokenReview) (*v1.TokenReview, error)
|
||||||
TokenReviewExpansion
|
TokenReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||||
|
func (c *tokenReviews) Create(tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
|
||||||
|
result = &v1.TokenReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("tokenreviews").
|
||||||
|
Body(tokenReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -17,6 +17,7 @@ go_library(
|
|||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/authentication/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/authentication/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/authentication/v1beta1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeTokenReviews implements TokenReviewInterface
|
// FakeTokenReviews implements TokenReviewInterface
|
||||||
type FakeTokenReviews struct {
|
type FakeTokenReviews struct {
|
||||||
Fake *FakeAuthenticationV1beta1
|
Fake *FakeAuthenticationV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1beta1", Resource: "tokenreviews"}
|
||||||
|
|
||||||
|
var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1beta1", Kind: "TokenReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||||
|
func (c *FakeTokenReviews) Create(tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.TokenReview), err
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/authentication/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type TokenReviewsGetter interface {
|
|||||||
|
|
||||||
// TokenReviewInterface has methods to work with TokenReview resources.
|
// TokenReviewInterface has methods to work with TokenReview resources.
|
||||||
type TokenReviewInterface interface {
|
type TokenReviewInterface interface {
|
||||||
|
Create(*v1beta1.TokenReview) (*v1beta1.TokenReview, error)
|
||||||
TokenReviewExpansion
|
TokenReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews {
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||||
|
func (c *tokenReviews) Create(tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
|
||||||
|
result = &v1beta1.TokenReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("tokenreviews").
|
||||||
|
Body(tokenReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -23,6 +23,7 @@ go_library(
|
|||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/authorization/v1:go_default_library",
|
"//staging/src/k8s.io/api/authorization/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
||||||
|
@ -18,8 +18,29 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
||||||
type FakeLocalSubjectAccessReviews struct {
|
type FakeLocalSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1
|
Fake *FakeAuthorizationV1
|
||||||
ns string
|
ns string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "localsubjectaccessreviews"}
|
||||||
|
|
||||||
|
var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeLocalSubjectAccessReviews) Create(localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.LocalSubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
||||||
type FakeSelfSubjectAccessReviews struct {
|
type FakeSelfSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1
|
Fake *FakeAuthorizationV1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectaccessreviews"}
|
||||||
|
|
||||||
|
var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeSelfSubjectAccessReviews) Create(selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.SelfSubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
|
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
|
||||||
type FakeSelfSubjectRulesReviews struct {
|
type FakeSelfSubjectRulesReviews struct {
|
||||||
Fake *FakeAuthorizationV1
|
Fake *FakeAuthorizationV1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectrulesreviews"}
|
||||||
|
|
||||||
|
var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectRulesReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||||
|
func (c *FakeSelfSubjectRulesReviews) Create(selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.SelfSubjectRulesReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
||||||
type FakeSubjectAccessReviews struct {
|
type FakeSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1
|
Fake *FakeAuthorizationV1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "subjectaccessreviews"}
|
||||||
|
|
||||||
|
var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeSubjectAccessReviews) Create(subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.SubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type LocalSubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
|
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
|
||||||
type LocalSubjectAccessReviewInterface interface {
|
type LocalSubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1.LocalSubjectAccessReview) (*v1.LocalSubjectAccessReview, error)
|
||||||
LocalSubjectAccessReviewExpansion
|
LocalSubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,3 +50,15 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *l
|
|||||||
ns: namespace,
|
ns: namespace,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *localSubjectAccessReviews) Create(localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
|
||||||
|
result = &v1.LocalSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("localsubjectaccessreviews").
|
||||||
|
Body(localSubjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SelfSubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
|
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
|
||||||
type SelfSubjectAccessReviewInterface interface {
|
type SelfSubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1.SelfSubjectAccessReview) (*v1.SelfSubjectAccessReview, error)
|
||||||
SelfSubjectAccessReviewExpansion
|
SelfSubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessRev
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *selfSubjectAccessReviews) Create(selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
|
||||||
|
result = &v1.SelfSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("selfsubjectaccessreviews").
|
||||||
|
Body(selfSubjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SelfSubjectRulesReviewsGetter interface {
|
|||||||
|
|
||||||
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
|
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
|
||||||
type SelfSubjectRulesReviewInterface interface {
|
type SelfSubjectRulesReviewInterface interface {
|
||||||
|
Create(*v1.SelfSubjectRulesReview) (*v1.SelfSubjectRulesReview, error)
|
||||||
SelfSubjectRulesReviewExpansion
|
SelfSubjectRulesReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesRevie
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||||
|
func (c *selfSubjectRulesReviews) Create(selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
|
||||||
|
result = &v1.SelfSubjectRulesReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("selfsubjectrulesreviews").
|
||||||
|
Body(selfSubjectRulesReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/authorization/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
||||||
type SubjectAccessReviewInterface interface {
|
type SubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1.SubjectAccessReview) (*v1.SubjectAccessReview, error)
|
||||||
SubjectAccessReviewExpansion
|
SubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews {
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *subjectAccessReviews) Create(subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
|
||||||
|
result = &v1.SubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("subjectaccessreviews").
|
||||||
|
Body(subjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -24,6 +24,7 @@ go_library(
|
|||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
||||||
|
@ -18,8 +18,29 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
||||||
type FakeLocalSubjectAccessReviews struct {
|
type FakeLocalSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1beta1
|
Fake *FakeAuthorizationV1beta1
|
||||||
ns string
|
ns string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "localsubjectaccessreviews"}
|
||||||
|
|
||||||
|
var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "LocalSubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeLocalSubjectAccessReviews) Create(localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.LocalSubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
||||||
type FakeSelfSubjectAccessReviews struct {
|
type FakeSelfSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1beta1
|
Fake *FakeAuthorizationV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectaccessreviews"}
|
||||||
|
|
||||||
|
var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeSelfSubjectAccessReviews) Create(selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.SelfSubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
|
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
|
||||||
type FakeSelfSubjectRulesReviews struct {
|
type FakeSelfSubjectRulesReviews struct {
|
||||||
Fake *FakeAuthorizationV1beta1
|
Fake *FakeAuthorizationV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectrulesreviews"}
|
||||||
|
|
||||||
|
var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectRulesReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||||
|
func (c *FakeSelfSubjectRulesReviews) Create(selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.SelfSubjectRulesReview), err
|
||||||
|
}
|
||||||
|
@ -18,7 +18,27 @@ limitations under the License.
|
|||||||
|
|
||||||
package fake
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
||||||
type FakeSubjectAccessReviews struct {
|
type FakeSubjectAccessReviews struct {
|
||||||
Fake *FakeAuthorizationV1beta1
|
Fake *FakeAuthorizationV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "subjectaccessreviews"}
|
||||||
|
|
||||||
|
var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SubjectAccessReview"}
|
||||||
|
|
||||||
|
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *FakeSubjectAccessReviews) Create(subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta1.SubjectAccessReview), err
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type LocalSubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
|
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
|
||||||
type LocalSubjectAccessReviewInterface interface {
|
type LocalSubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1beta1.LocalSubjectAccessReview) (*v1beta1.LocalSubjectAccessReview, error)
|
||||||
LocalSubjectAccessReviewExpansion
|
LocalSubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,3 +50,15 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace strin
|
|||||||
ns: namespace,
|
ns: namespace,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *localSubjectAccessReviews) Create(localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
|
||||||
|
result = &v1beta1.LocalSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("localsubjectaccessreviews").
|
||||||
|
Body(localSubjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SelfSubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
|
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
|
||||||
type SelfSubjectAccessReviewInterface interface {
|
type SelfSubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1beta1.SelfSubjectAccessReview) (*v1beta1.SelfSubjectAccessReview, error)
|
||||||
SelfSubjectAccessReviewExpansion
|
SelfSubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAcce
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *selfSubjectAccessReviews) Create(selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
|
||||||
|
result = &v1beta1.SelfSubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("selfsubjectaccessreviews").
|
||||||
|
Body(selfSubjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SelfSubjectRulesReviewsGetter interface {
|
|||||||
|
|
||||||
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
|
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
|
||||||
type SelfSubjectRulesReviewInterface interface {
|
type SelfSubjectRulesReviewInterface interface {
|
||||||
|
Create(*v1beta1.SelfSubjectRulesReview) (*v1beta1.SelfSubjectRulesReview, error)
|
||||||
SelfSubjectRulesReviewExpansion
|
SelfSubjectRulesReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRules
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||||
|
func (c *selfSubjectRulesReviews) Create(selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
|
||||||
|
result = &v1beta1.SelfSubjectRulesReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("selfsubjectrulesreviews").
|
||||||
|
Body(selfSubjectRulesReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -19,6 +19,9 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,6 +33,7 @@ type SubjectAccessReviewsGetter interface {
|
|||||||
|
|
||||||
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
||||||
type SubjectAccessReviewInterface interface {
|
type SubjectAccessReviewInterface interface {
|
||||||
|
Create(*v1beta1.SubjectAccessReview) (*v1beta1.SubjectAccessReview, error)
|
||||||
SubjectAccessReviewExpansion
|
SubjectAccessReviewExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +48,14 @@ func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReview
|
|||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||||
|
func (c *subjectAccessReviews) Create(subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
|
||||||
|
result = &v1beta1.SubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("subjectaccessreviews").
|
||||||
|
Body(subjectAccessReview).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -32,7 +32,6 @@ go_library(
|
|||||||
"service.go",
|
"service.go",
|
||||||
"service_expansion.go",
|
"service_expansion.go",
|
||||||
"serviceaccount.go",
|
"serviceaccount.go",
|
||||||
"serviceaccount_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/core/v1",
|
importpath = "k8s.io/client-go/kubernetes/typed/core/v1",
|
||||||
|
@ -31,7 +31,6 @@ go_library(
|
|||||||
"fake_service.go",
|
"fake_service.go",
|
||||||
"fake_service_expansion.go",
|
"fake_service_expansion.go",
|
||||||
"fake_serviceaccount.go",
|
"fake_serviceaccount.go",
|
||||||
"fake_serviceaccount_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/core/v1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/core/v1/fake",
|
||||||
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||||||
package fake
|
package fake
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
authenticationv1 "k8s.io/api/authentication/v1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
@ -126,3 +127,14 @@ func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte
|
|||||||
}
|
}
|
||||||
return obj.(*corev1.ServiceAccount), err
|
return obj.(*corev1.ServiceAccount), err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any.
|
||||||
|
func (c *FakeServiceAccounts) CreateToken(serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateSubresourceAction(serviceaccountsResource, serviceAccountName, "token", c.ns, tokenRequest), &authenticationv1.TokenRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*authenticationv1.TokenRequest), err
|
||||||
|
}
|
||||||
|
@ -37,3 +37,5 @@ type ReplicationControllerExpansion interface{}
|
|||||||
type ResourceQuotaExpansion interface{}
|
type ResourceQuotaExpansion interface{}
|
||||||
|
|
||||||
type SecretExpansion interface{}
|
type SecretExpansion interface{}
|
||||||
|
|
||||||
|
type ServiceAccountExpansion interface{}
|
||||||
|
@ -22,6 +22,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
authenticationv1 "k8s.io/api/authentication/v1"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
@ -46,6 +47,8 @@ type ServiceAccountInterface interface {
|
|||||||
List(opts metav1.ListOptions) (*v1.ServiceAccountList, error)
|
List(opts metav1.ListOptions) (*v1.ServiceAccountList, error)
|
||||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
|
||||||
|
CreateToken(serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error)
|
||||||
|
|
||||||
ServiceAccountExpansion
|
ServiceAccountExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,3 +176,17 @@ func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, su
|
|||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any.
|
||||||
|
func (c *serviceAccounts) CreateToken(serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) {
|
||||||
|
result = &authenticationv1.TokenRequest{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("serviceaccounts").
|
||||||
|
Name(serviceAccountName).
|
||||||
|
SubResource("token").
|
||||||
|
Body(tokenRequest).
|
||||||
|
Do(context.TODO()).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user