Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
508 changes: 393 additions & 115 deletions authorization/v1/generated.pb.go

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion authorization/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 29 additions & 5 deletions authorization/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ type NamedRoleBinding struct {
type SelfSubjectRulesReview struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"`

// Spec adds information about how to conduct the check
Spec SelfSubjectRulesReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"`

Expand All @@ -180,6 +184,10 @@ type SelfSubjectRulesReviewSpec struct {
type SubjectRulesReview struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"`

// Spec adds information about how to conduct the check
Spec SubjectRulesReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"`

Expand Down Expand Up @@ -232,7 +240,7 @@ type ResourceAccessReviewResponse struct {

// +genclient
// +genclient:nonNamespaced
// +genclient:skipVerbs=apply,get,list,create,update,patch,delete,deleteCollection,watch
// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onlyVerb create?

Copy link
Copy Markdown
Member Author

@atiratree atiratree Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it conflicts with

// +genclient:method=Create,verb=create,result=ResourceAccessReviewResponse

Copy link
Copy Markdown
Member Author

@atiratree atiratree Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generates create twice


// Create takes the representation of a resourceAccessReview and creates it.  Returns the server's representation of the resourceAccessReview, and an error, if there is any.
func (c *resourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReview, err error) {
	result = &v1.ResourceAccessReview{}
	err = c.client.Post().
		Resource("resourceaccessreviews").
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(resourceAccessReview).
		Do(ctx).
		Into(result)
	return
}

// Create takes the representation of a resourceAccessReview and creates it.  Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any.
func (c *resourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) {
	result = &v1.ResourceAccessReviewResponse{}
	err = c.client.Post().
		Resource("resourceaccessreviews").
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(resourceAccessReview).
		Do(ctx).
		Into(result)
	return
}

// +genclient:method=Create,verb=create,result=ResourceAccessReviewResponse
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand All @@ -244,6 +252,10 @@ type ResourceAccessReviewResponse struct {
type ResourceAccessReview struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"`

// Action describes the action being tested.
Action `json:",inline" protobuf:"bytes,1,opt,name=Action"`
}
Expand Down Expand Up @@ -280,7 +292,7 @@ func (t OptionalScopes) String() string {

// +genclient
// +genclient:nonNamespaced
// +genclient:skipVerbs=apply,get,list,create,update,patch,delete,deleteCollection,watch
// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch
Comment thread
atiratree marked this conversation as resolved.
// +genclient:method=Create,verb=create,result=SubjectAccessReviewResponse
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand All @@ -291,6 +303,10 @@ func (t OptionalScopes) String() string {
type SubjectAccessReview struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,5,opt,name=metadata"`

// Action describes the action being tested.
Action `json:",inline" protobuf:"bytes,1,opt,name=Action"`
// User is optional. If both User and Groups are empty, the current authenticated user is used.
Expand All @@ -306,7 +322,7 @@ type SubjectAccessReview struct {
}

// +genclient
// +genclient:skipVerbs=apply,get,list,create,update,patch,delete,deleteCollection,watch
// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch
Comment thread
atiratree marked this conversation as resolved.
// +genclient:method=Create,verb=create,result=ResourceAccessReviewResponse
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand All @@ -317,12 +333,16 @@ type SubjectAccessReview struct {
type LocalResourceAccessReview struct {
metav1.TypeMeta `json:",inline"`

// Action describes the action being tested. The Namespace element is FORCED to the current namespace.
// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"`

// Action describes the action being tested. The Namespace element is FORCED to the current namespace.
Action `json:",inline" protobuf:"bytes,1,opt,name=Action"`
}

// +genclient
// +genclient:skipVerbs=apply,get,list,create,update,patch,delete,deleteCollection,watch
// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch
Comment thread
atiratree marked this conversation as resolved.
// +genclient:method=Create,verb=create,result=SubjectAccessReviewResponse
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand All @@ -333,6 +353,10 @@ type LocalResourceAccessReview struct {
type LocalSubjectAccessReview struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,5,opt,name=metadata"`

// Action describes the action being tested. The Namespace element is FORCED to the current namespace.
Action `json:",inline" protobuf:"bytes,1,opt,name=Action"`
// User is optional. If both User and Groups are empty, the current authenticated user is used.
Expand Down
6 changes: 6 additions & 0 deletions authorization/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 22 additions & 16 deletions authorization/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading