Skip to content

Commit 533d0b7

Browse files
committed
use generated clients instead of expansions for most of authn/z
1 parent 845b232 commit 533d0b7

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

staging/src/k8s.io/api/authentication/v1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040

4141
// +genclient
4242
// +genclient:nonNamespaced
43-
// +genclient:noVerbs
43+
// +genclient:onlyVerbs=create
4444
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
4545

4646
// TokenReview attempts to authenticate a token to a known user.

staging/src/k8s.io/api/authentication/v1beta1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
// +genclient
2626
// +genclient:nonNamespaced
27-
// +genclient:noVerbs
27+
// +genclient:onlyVerbs=create
2828
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2929

3030
// TokenReview attempts to authenticate a token to a known user.

staging/src/k8s.io/api/authorization/v1/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
// +genclient
2626
// +genclient:nonNamespaced
27-
// +genclient:noVerbs
27+
// +genclient:onlyVerbs=create
2828
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2929

3030
// SubjectAccessReview checks whether or not a user or group can perform an action.
@@ -43,7 +43,7 @@ type SubjectAccessReview struct {
4343

4444
// +genclient
4545
// +genclient:nonNamespaced
46-
// +genclient:noVerbs
46+
// +genclient:onlyVerbs=create
4747
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
4848

4949
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
@@ -63,7 +63,7 @@ type SelfSubjectAccessReview struct {
6363
}
6464

6565
// +genclient
66-
// +genclient:noVerbs
66+
// +genclient:onlyVerbs=create
6767
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
6868

6969
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
@@ -189,7 +189,7 @@ type SubjectAccessReviewStatus struct {
189189

190190
// +genclient
191191
// +genclient:nonNamespaced
192-
// +genclient:noVerbs
192+
// +genclient:onlyVerbs=create
193193
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
194194

195195
// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.

staging/src/k8s.io/api/authorization/v1beta1/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
// +genclient
2626
// +genclient:nonNamespaced
27-
// +genclient:noVerbs
27+
// +genclient:onlyVerbs=create
2828
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2929

3030
// SubjectAccessReview checks whether or not a user or group can perform an action.
@@ -43,7 +43,7 @@ type SubjectAccessReview struct {
4343

4444
// +genclient
4545
// +genclient:nonNamespaced
46-
// +genclient:noVerbs
46+
// +genclient:onlyVerbs=create
4747
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
4848

4949
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
@@ -63,7 +63,7 @@ type SelfSubjectAccessReview struct {
6363
}
6464

6565
// +genclient
66-
// +genclient:noVerbs
66+
// +genclient:onlyVerbs=create
6767
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
6868

6969
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
@@ -189,7 +189,7 @@ type SubjectAccessReviewStatus struct {
189189

190190
// +genclient
191191
// +genclient:nonNamespaced
192-
// +genclient:noVerbs
192+
// +genclient:onlyVerbs=create
193193
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
194194

195195
// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.

staging/src/k8s.io/api/core/v1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4061,6 +4061,7 @@ type ServiceList struct {
40614061
}
40624062

40634063
// +genclient
4064+
// +genclient:method=CreateToken,verb=create,subresource=token,input=k8s.io/api/authentication/v1.TokenRequest,result=k8s.io/api/authentication/v1.TokenRequest
40644065
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
40654066

40664067
// ServiceAccount binds together:

0 commit comments

Comments
 (0)