mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Add missing comments in APF API types
This commit is contained in:
parent
132e3c4020
commit
179e48c4be
11
api/openapi-spec/swagger.json
generated
11
api/openapi-spec/swagger.json
generated
@ -11098,17 +11098,20 @@
|
|||||||
"description": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
"description": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"group": {
|
"group": {
|
||||||
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.GroupSubject"
|
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.GroupSubject",
|
||||||
|
"description": "`group` matches based on user group name."
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"description": "Required",
|
"description": "`kind` indicates which one of the other fields is non-empty. Required",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"serviceAccount": {
|
"serviceAccount": {
|
||||||
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject"
|
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject",
|
||||||
|
"description": "`serviceAccount` matches ServiceAccounts."
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.UserSubject"
|
"$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.UserSubject",
|
||||||
|
"description": "`user` matches based on username."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -4,7 +4,5 @@
|
|||||||
./staging/src/k8s.io/api/certificates/v1/types.go
|
./staging/src/k8s.io/api/certificates/v1/types.go
|
||||||
./staging/src/k8s.io/api/certificates/v1beta1/types.go
|
./staging/src/k8s.io/api/certificates/v1beta1/types.go
|
||||||
./staging/src/k8s.io/api/core/v1/types.go
|
./staging/src/k8s.io/api/core/v1/types.go
|
||||||
./staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go
|
|
||||||
./staging/src/k8s.io/api/flowcontrol/v1beta1/types.go
|
|
||||||
./staging/src/k8s.io/api/networking/v1/types.go
|
./staging/src/k8s.io/api/networking/v1/types.go
|
||||||
./staging/src/k8s.io/api/networking/v1beta1/types.go
|
./staging/src/k8s.io/api/networking/v1beta1/types.go
|
||||||
|
@ -171,13 +171,17 @@ type PolicyRulesWithSubjects struct {
|
|||||||
// ways of matching an originator; by user, group, or service account.
|
// ways of matching an originator; by user, group, or service account.
|
||||||
// +union
|
// +union
|
||||||
type Subject struct {
|
type Subject struct {
|
||||||
|
// `kind` indicates which one of the other fields is non-empty.
|
||||||
// Required
|
// Required
|
||||||
// +unionDiscriminator
|
// +unionDiscriminator
|
||||||
Kind SubjectKind
|
Kind SubjectKind
|
||||||
|
// `user` matches based on username.
|
||||||
// +optional
|
// +optional
|
||||||
User *UserSubject
|
User *UserSubject
|
||||||
|
// `group` matches based on user group name.
|
||||||
// +optional
|
// +optional
|
||||||
Group *GroupSubject
|
Group *GroupSubject
|
||||||
|
// `serviceAccount` matches ServiceAccounts.
|
||||||
// +optional
|
// +optional
|
||||||
ServiceAccount *ServiceAccountSubject
|
ServiceAccount *ServiceAccountSubject
|
||||||
}
|
}
|
||||||
|
@ -411,16 +411,20 @@ message ServiceAccountSubject {
|
|||||||
// ways of matching an originator; by user, group, or service account.
|
// ways of matching an originator; by user, group, or service account.
|
||||||
// +union
|
// +union
|
||||||
message Subject {
|
message Subject {
|
||||||
|
// `kind` indicates which one of the other fields is non-empty.
|
||||||
// Required
|
// Required
|
||||||
// +unionDiscriminator
|
// +unionDiscriminator
|
||||||
optional string kind = 1;
|
optional string kind = 1;
|
||||||
|
|
||||||
|
// `user` matches based on username.
|
||||||
// +optional
|
// +optional
|
||||||
optional UserSubject user = 2;
|
optional UserSubject user = 2;
|
||||||
|
|
||||||
|
// `group` matches based on user group name.
|
||||||
// +optional
|
// +optional
|
||||||
optional GroupSubject group = 3;
|
optional GroupSubject group = 3;
|
||||||
|
|
||||||
|
// `serviceAccount` matches ServiceAccounts.
|
||||||
// +optional
|
// +optional
|
||||||
optional ServiceAccountSubject serviceAccount = 4;
|
optional ServiceAccountSubject serviceAccount = 4;
|
||||||
}
|
}
|
||||||
|
@ -185,13 +185,17 @@ type PolicyRulesWithSubjects struct {
|
|||||||
// ways of matching an originator; by user, group, or service account.
|
// ways of matching an originator; by user, group, or service account.
|
||||||
// +union
|
// +union
|
||||||
type Subject struct {
|
type Subject struct {
|
||||||
|
// `kind` indicates which one of the other fields is non-empty.
|
||||||
// Required
|
// Required
|
||||||
// +unionDiscriminator
|
// +unionDiscriminator
|
||||||
Kind SubjectKind `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind SubjectKind `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
|
// `user` matches based on username.
|
||||||
// +optional
|
// +optional
|
||||||
User *UserSubject `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
User *UserSubject `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
||||||
|
// `group` matches based on user group name.
|
||||||
// +optional
|
// +optional
|
||||||
Group *GroupSubject `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
Group *GroupSubject `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
||||||
|
// `serviceAccount` matches ServiceAccounts.
|
||||||
// +optional
|
// +optional
|
||||||
ServiceAccount *ServiceAccountSubject `json:"serviceAccount,omitempty" protobuf:"bytes,4,opt,name=serviceAccount"`
|
ServiceAccount *ServiceAccountSubject `json:"serviceAccount,omitempty" protobuf:"bytes,4,opt,name=serviceAccount"`
|
||||||
}
|
}
|
||||||
|
@ -238,8 +238,11 @@ func (ServiceAccountSubject) SwaggerDoc() map[string]string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var map_Subject = map[string]string{
|
var map_Subject = map[string]string{
|
||||||
"": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
"": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
||||||
"kind": "Required",
|
"kind": "`kind` indicates which one of the other fields is non-empty. Required",
|
||||||
|
"user": "`user` matches based on username.",
|
||||||
|
"group": "`group` matches based on user group name.",
|
||||||
|
"serviceAccount": "`serviceAccount` matches ServiceAccounts.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Subject) SwaggerDoc() map[string]string {
|
func (Subject) SwaggerDoc() map[string]string {
|
||||||
|
@ -411,16 +411,20 @@ message ServiceAccountSubject {
|
|||||||
// ways of matching an originator; by user, group, or service account.
|
// ways of matching an originator; by user, group, or service account.
|
||||||
// +union
|
// +union
|
||||||
message Subject {
|
message Subject {
|
||||||
|
// `kind` indicates which one of the other fields is non-empty.
|
||||||
// Required
|
// Required
|
||||||
// +unionDiscriminator
|
// +unionDiscriminator
|
||||||
optional string kind = 1;
|
optional string kind = 1;
|
||||||
|
|
||||||
|
// `user` matches based on username.
|
||||||
// +optional
|
// +optional
|
||||||
optional UserSubject user = 2;
|
optional UserSubject user = 2;
|
||||||
|
|
||||||
|
// `group` matches based on user group name.
|
||||||
// +optional
|
// +optional
|
||||||
optional GroupSubject group = 3;
|
optional GroupSubject group = 3;
|
||||||
|
|
||||||
|
// `serviceAccount` matches ServiceAccounts.
|
||||||
// +optional
|
// +optional
|
||||||
optional ServiceAccountSubject serviceAccount = 4;
|
optional ServiceAccountSubject serviceAccount = 4;
|
||||||
}
|
}
|
||||||
|
@ -223,13 +223,17 @@ type PolicyRulesWithSubjects struct {
|
|||||||
// ways of matching an originator; by user, group, or service account.
|
// ways of matching an originator; by user, group, or service account.
|
||||||
// +union
|
// +union
|
||||||
type Subject struct {
|
type Subject struct {
|
||||||
|
// `kind` indicates which one of the other fields is non-empty.
|
||||||
// Required
|
// Required
|
||||||
// +unionDiscriminator
|
// +unionDiscriminator
|
||||||
Kind SubjectKind `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind SubjectKind `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
|
// `user` matches based on username.
|
||||||
// +optional
|
// +optional
|
||||||
User *UserSubject `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
User *UserSubject `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
||||||
|
// `group` matches based on user group name.
|
||||||
// +optional
|
// +optional
|
||||||
Group *GroupSubject `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
Group *GroupSubject `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
||||||
|
// `serviceAccount` matches ServiceAccounts.
|
||||||
// +optional
|
// +optional
|
||||||
ServiceAccount *ServiceAccountSubject `json:"serviceAccount,omitempty" protobuf:"bytes,4,opt,name=serviceAccount"`
|
ServiceAccount *ServiceAccountSubject `json:"serviceAccount,omitempty" protobuf:"bytes,4,opt,name=serviceAccount"`
|
||||||
}
|
}
|
||||||
|
@ -238,8 +238,11 @@ func (ServiceAccountSubject) SwaggerDoc() map[string]string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var map_Subject = map[string]string{
|
var map_Subject = map[string]string{
|
||||||
"": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
"": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.",
|
||||||
"kind": "Required",
|
"kind": "`kind` indicates which one of the other fields is non-empty. Required",
|
||||||
|
"user": "`user` matches based on username.",
|
||||||
|
"group": "`group` matches based on user group name.",
|
||||||
|
"serviceAccount": "`serviceAccount` matches ServiceAccounts.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Subject) SwaggerDoc() map[string]string {
|
func (Subject) SwaggerDoc() map[string]string {
|
||||||
|
Loading…
Reference in New Issue
Block a user