mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #87991 from mikedanese/createcontext
remove authn/z.CreateContext expansions
This commit is contained in:
commit
0b2636a7e7
@ -406,14 +406,6 @@ staging/src/k8s.io/client-go/discovery/fake
|
|||||||
staging/src/k8s.io/client-go/dynamic
|
staging/src/k8s.io/client-go/dynamic
|
||||||
staging/src/k8s.io/client-go/dynamic/fake
|
staging/src/k8s.io/client-go/dynamic/fake
|
||||||
staging/src/k8s.io/client-go/examples/workqueue
|
staging/src/k8s.io/client-go/examples/workqueue
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake
|
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
|
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake
|
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake
|
||||||
staging/src/k8s.io/client-go/kubernetes/typed/core/v1
|
staging/src/k8s.io/client-go/kubernetes/typed/core/v1
|
||||||
|
@ -36,6 +36,7 @@ go_library(
|
|||||||
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/api/authentication/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/authentication/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library",
|
||||||
|
@ -25,6 +25,7 @@ import (
|
|||||||
|
|
||||||
authenticationv1 "k8s.io/api/authentication/v1"
|
authenticationv1 "k8s.io/api/authentication/v1"
|
||||||
authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
|
authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
"k8s.io/apiserver/pkg/authentication/authenticator"
|
"k8s.io/apiserver/pkg/authentication/authenticator"
|
||||||
@ -41,7 +42,7 @@ const retryBackoff = 500 * time.Millisecond
|
|||||||
var _ authenticator.Token = (*WebhookTokenAuthenticator)(nil)
|
var _ authenticator.Token = (*WebhookTokenAuthenticator)(nil)
|
||||||
|
|
||||||
type tokenReviewer interface {
|
type tokenReviewer interface {
|
||||||
CreateContext(ctx context.Context, review *authenticationv1.TokenReview) (*authenticationv1.TokenReview, error)
|
Create(ctx context.Context, review *authenticationv1.TokenReview, _ metav1.CreateOptions) (*authenticationv1.TokenReview, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebhookTokenAuthenticator struct {
|
type WebhookTokenAuthenticator struct {
|
||||||
@ -101,7 +102,7 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(ctx context.Context, token
|
|||||||
auds authenticator.Audiences
|
auds authenticator.Audiences
|
||||||
)
|
)
|
||||||
webhook.WithExponentialBackoff(ctx, w.initialBackoff, func() error {
|
webhook.WithExponentialBackoff(ctx, w.initialBackoff, func() error {
|
||||||
result, err = w.tokenReview.CreateContext(ctx, r)
|
result, err = w.tokenReview.Create(ctx, r, metav1.CreateOptions{})
|
||||||
return err
|
return err
|
||||||
}, webhook.DefaultShouldRetry)
|
}, webhook.DefaultShouldRetry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -196,7 +197,7 @@ type tokenReviewV1Client struct {
|
|||||||
w *webhook.GenericWebhook
|
w *webhook.GenericWebhook
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *tokenReviewV1Client) CreateContext(ctx context.Context, review *authenticationv1.TokenReview) (*authenticationv1.TokenReview, error) {
|
func (t *tokenReviewV1Client) Create(ctx context.Context, review *authenticationv1.TokenReview, _ metav1.CreateOptions) (*authenticationv1.TokenReview, error) {
|
||||||
result := &authenticationv1.TokenReview{}
|
result := &authenticationv1.TokenReview{}
|
||||||
err := t.w.RestClient.Post().Body(review).Do(ctx).Into(result)
|
err := t.w.RestClient.Post().Body(review).Do(ctx).Into(result)
|
||||||
return result, err
|
return result, err
|
||||||
@ -206,7 +207,7 @@ type tokenReviewV1beta1Client struct {
|
|||||||
w *webhook.GenericWebhook
|
w *webhook.GenericWebhook
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *tokenReviewV1beta1Client) CreateContext(ctx context.Context, review *authenticationv1.TokenReview) (*authenticationv1.TokenReview, error) {
|
func (t *tokenReviewV1beta1Client) Create(ctx context.Context, review *authenticationv1.TokenReview, _ metav1.CreateOptions) (*authenticationv1.TokenReview, error) {
|
||||||
v1beta1Review := &authenticationv1beta1.TokenReview{Spec: v1SpecToV1beta1Spec(&review.Spec)}
|
v1beta1Review := &authenticationv1beta1.TokenReview{Spec: v1SpecToV1beta1Spec(&review.Spec)}
|
||||||
v1beta1Result := &authenticationv1beta1.TokenReview{}
|
v1beta1Result := &authenticationv1beta1.TokenReview{}
|
||||||
err := t.w.RestClient.Post().Body(v1beta1Review).Do(ctx).Into(v1beta1Result)
|
err := t.w.RestClient.Post().Body(v1beta1Review).Do(ctx).Into(v1beta1Result)
|
||||||
|
@ -35,6 +35,7 @@ go_library(
|
|||||||
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/api/authorization/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/authorization/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/cache:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/cache:go_default_library",
|
||||||
|
@ -27,6 +27,7 @@ import (
|
|||||||
|
|
||||||
authorizationv1 "k8s.io/api/authorization/v1"
|
authorizationv1 "k8s.io/api/authorization/v1"
|
||||||
authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
|
authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
"k8s.io/apimachinery/pkg/util/cache"
|
"k8s.io/apimachinery/pkg/util/cache"
|
||||||
@ -47,7 +48,7 @@ const (
|
|||||||
var _ authorizer.Authorizer = (*WebhookAuthorizer)(nil)
|
var _ authorizer.Authorizer = (*WebhookAuthorizer)(nil)
|
||||||
|
|
||||||
type subjectAccessReviewer interface {
|
type subjectAccessReviewer interface {
|
||||||
CreateContext(context.Context, *authorizationv1.SubjectAccessReview) (*authorizationv1.SubjectAccessReview, error)
|
Create(context.Context, *authorizationv1.SubjectAccessReview, metav1.CreateOptions) (*authorizationv1.SubjectAccessReview, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebhookAuthorizer struct {
|
type WebhookAuthorizer struct {
|
||||||
@ -189,7 +190,7 @@ func (w *WebhookAuthorizer) Authorize(ctx context.Context, attr authorizer.Attri
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
webhook.WithExponentialBackoff(ctx, w.initialBackoff, func() error {
|
webhook.WithExponentialBackoff(ctx, w.initialBackoff, func() error {
|
||||||
result, err = w.subjectAccessReview.CreateContext(ctx, r)
|
result, err = w.subjectAccessReview.Create(ctx, r, metav1.CreateOptions{})
|
||||||
return err
|
return err
|
||||||
}, webhook.DefaultShouldRetry)
|
}, webhook.DefaultShouldRetry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -287,7 +288,7 @@ type subjectAccessReviewV1Client struct {
|
|||||||
w *webhook.GenericWebhook
|
w *webhook.GenericWebhook
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *subjectAccessReviewV1Client) CreateContext(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview) (*authorizationv1.SubjectAccessReview, error) {
|
func (t *subjectAccessReviewV1Client) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, _ metav1.CreateOptions) (*authorizationv1.SubjectAccessReview, error) {
|
||||||
result := &authorizationv1.SubjectAccessReview{}
|
result := &authorizationv1.SubjectAccessReview{}
|
||||||
err := t.w.RestClient.Post().Body(subjectAccessReview).Do(ctx).Into(result)
|
err := t.w.RestClient.Post().Body(subjectAccessReview).Do(ctx).Into(result)
|
||||||
return result, err
|
return result, err
|
||||||
@ -297,7 +298,7 @@ type subjectAccessReviewV1beta1Client struct {
|
|||||||
w *webhook.GenericWebhook
|
w *webhook.GenericWebhook
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *subjectAccessReviewV1beta1Client) CreateContext(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview) (*authorizationv1.SubjectAccessReview, error) {
|
func (t *subjectAccessReviewV1beta1Client) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, _ metav1.CreateOptions) (*authorizationv1.SubjectAccessReview, error) {
|
||||||
v1beta1Review := &authorizationv1beta1.SubjectAccessReview{Spec: v1SpecToV1beta1Spec(&subjectAccessReview.Spec)}
|
v1beta1Review := &authorizationv1beta1.SubjectAccessReview{Spec: v1SpecToV1beta1Spec(&subjectAccessReview.Spec)}
|
||||||
v1beta1Result := &authorizationv1beta1.SubjectAccessReview{}
|
v1beta1Result := &authorizationv1beta1.SubjectAccessReview{}
|
||||||
err := t.w.RestClient.Post().Body(v1beta1Review).Do(ctx).Into(v1beta1Result)
|
err := t.w.RestClient.Post().Body(v1beta1Review).Do(ctx).Into(v1beta1Result)
|
||||||
|
@ -12,7 +12,6 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"tokenreview.go",
|
"tokenreview.go",
|
||||||
"tokenreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1",
|
||||||
|
@ -11,7 +11,6 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_authentication_client.go",
|
"fake_authentication_client.go",
|
||||||
"fake_tokenreview.go",
|
"fake_tokenreview.go",
|
||||||
"fake_tokenreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authenticationapi "k8s.io/api/authentication/v1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeTokenReviews) CreateContext(ctx context.Context, 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,3 +17,5 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
|
type TokenReviewExpansion interface{}
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authenticationapi "k8s.io/api/authentication/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TokenReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
|
|
||||||
result = &authenticationapi.TokenReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("tokenreviews").
|
|
||||||
Body(tokenReview).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -12,7 +12,6 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"tokenreview.go",
|
"tokenreview.go",
|
||||||
"tokenreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
|
||||||
|
@ -11,7 +11,6 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_authentication_client.go",
|
"fake_authentication_client.go",
|
||||||
"fake_tokenreview.go",
|
"fake_tokenreview.go",
|
||||||
"fake_tokenreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authenticationapi "k8s.io/api/authentication/v1beta1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeTokenReviews) CreateContext(ctx context.Context, 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,3 +17,5 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
|
type TokenReviewExpansion interface{}
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authenticationapi "k8s.io/api/authentication/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TokenReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
|
|
||||||
result = &authenticationapi.TokenReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("tokenreviews").
|
|
||||||
Body(tokenReview).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -12,13 +12,9 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"localsubjectaccessreview.go",
|
"localsubjectaccessreview.go",
|
||||||
"localsubjectaccessreview_expansion.go",
|
|
||||||
"selfsubjectaccessreview.go",
|
"selfsubjectaccessreview.go",
|
||||||
"selfsubjectaccessreview_expansion.go",
|
|
||||||
"selfsubjectrulesreview.go",
|
"selfsubjectrulesreview.go",
|
||||||
"selfsubjectrulesreview_expansion.go",
|
|
||||||
"subjectaccessreview.go",
|
"subjectaccessreview.go",
|
||||||
"subjectaccessreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1",
|
||||||
|
@ -11,13 +11,9 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_authorization_client.go",
|
"fake_authorization_client.go",
|
||||||
"fake_localsubjectaccessreview.go",
|
"fake_localsubjectaccessreview.go",
|
||||||
"fake_localsubjectaccessreview_expansion.go",
|
|
||||||
"fake_selfsubjectaccessreview.go",
|
"fake_selfsubjectaccessreview.go",
|
||||||
"fake_selfsubjectaccessreview_expansion.go",
|
|
||||||
"fake_selfsubjectrulesreview.go",
|
"fake_selfsubjectrulesreview.go",
|
||||||
"fake_selfsubjectrulesreview_expansion.go",
|
|
||||||
"fake_subjectaccessreview.go",
|
"fake_subjectaccessreview.go",
|
||||||
"fake_subjectaccessreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeLocalSubjectAccessReviews) CreateContext(ctx context.Context, 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
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSelfSubjectAccessReviews) CreateContext(ctx context.Context, 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
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSelfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
|
|
||||||
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{})
|
|
||||||
return obj.(*authorizationapi.SelfSubjectRulesReview), err
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
|
||||||
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*authorizationapi.SubjectAccessReview), err
|
|
||||||
}
|
|
@ -17,3 +17,11 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
|
type LocalSubjectAccessReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SelfSubjectAccessReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SelfSubjectRulesReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SubjectAccessReviewExpansion interface{}
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type LocalSubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.LocalSubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("localsubjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SelfSubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.SelfSubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("selfsubjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SelfSubjectRulesReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
|
|
||||||
result = &authorizationapi.SelfSubjectRulesReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("selfsubjectrulesreviews").
|
|
||||||
Body(srr).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
|
|
||||||
type SubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.SubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("subjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -12,13 +12,9 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"localsubjectaccessreview.go",
|
"localsubjectaccessreview.go",
|
||||||
"localsubjectaccessreview_expansion.go",
|
|
||||||
"selfsubjectaccessreview.go",
|
"selfsubjectaccessreview.go",
|
||||||
"selfsubjectaccessreview_expansion.go",
|
|
||||||
"selfsubjectrulesreview.go",
|
"selfsubjectrulesreview.go",
|
||||||
"selfsubjectrulesreview_expansion.go",
|
|
||||||
"subjectaccessreview.go",
|
"subjectaccessreview.go",
|
||||||
"subjectaccessreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
|
||||||
|
@ -10,15 +10,10 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_authorization_client.go",
|
"fake_authorization_client.go",
|
||||||
"fake_generated_expansion.go",
|
|
||||||
"fake_localsubjectaccessreview.go",
|
"fake_localsubjectaccessreview.go",
|
||||||
"fake_localsubjectaccessreview_expansion.go",
|
|
||||||
"fake_selfsubjectaccessreview.go",
|
"fake_selfsubjectaccessreview.go",
|
||||||
"fake_selfsubjectaccessreview_expansion.go",
|
|
||||||
"fake_selfsubjectrulesreview.go",
|
"fake_selfsubjectrulesreview.go",
|
||||||
"fake_selfsubjectrulesreview_expansion.go",
|
|
||||||
"fake_subjectaccessreview.go",
|
"fake_subjectaccessreview.go",
|
||||||
"fake_subjectaccessreview_expansion.go",
|
|
||||||
],
|
],
|
||||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeLocalSubjectAccessReviews) CreateContext(ctx context.Context, 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
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSelfSubjectAccessReviews) CreateContext(ctx context.Context, 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
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSelfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
|
|
||||||
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{})
|
|
||||||
return obj.(*authorizationapi.SelfSubjectRulesReview), err
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
core "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *FakeSubjectAccessReviews) CreateContext(ctx context.Context, 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,3 +17,11 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
|
type LocalSubjectAccessReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SelfSubjectAccessReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SelfSubjectRulesReviewExpansion interface{}
|
||||||
|
|
||||||
|
type SubjectAccessReviewExpansion interface{}
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type LocalSubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.LocalSubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("localsubjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SelfSubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.SelfSubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("selfsubjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SelfSubjectRulesReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
|
|
||||||
result = &authorizationapi.SelfSubjectRulesReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("selfsubjectrulesreviews").
|
|
||||||
Body(srr).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
authorizationapi "k8s.io/api/authorization/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
|
|
||||||
type SubjectAccessReviewExpansion interface {
|
|
||||||
CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.SubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("subjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user