Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename RBAC 'subject' to 'subjects'. #26924

Merged
merged 2 commits into from
Jun 18, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,7 @@
"id": "v1alpha1.ClusterRoleBinding",
"description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
"required": [
"subject",
"subjects",
"roleRef"
],
"properties": {
Expand All @@ -2701,7 +2701,7 @@
"$ref": "v1.ObjectMeta",
"description": "Standard object's metadata."
},
"subject": {
"subjects": {
"type": "array",
"items": {
"$ref": "v1alpha1.Subject"
Expand Down Expand Up @@ -3152,7 +3152,7 @@
"id": "v1alpha1.RoleBinding",
"description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
"required": [
"subject",
"subjects",
"roleRef"
],
"properties": {
Expand All @@ -3168,7 +3168,7 @@
"$ref": "v1.ObjectMeta",
"description": "Standard object's metadata."
},
"subject": {
"subjects": {
"type": "array",
"items": {
"$ref": "v1alpha1.Subject"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/rbac/v1alpha1/generated.proto

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

8 changes: 4 additions & 4 deletions pkg/apis/rbac/v1alpha1/types.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("subject"))
r.EncodeString(codecSelferC_UTF81234, string("subjects"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Subjects == nil {
r.EncodeNil()
Expand Down Expand Up @@ -1405,7 +1405,7 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
yyv4 := &x.ObjectMeta
yyv4.CodecDecodeSelf(d)
}
case "subject":
case "subjects":
if r.TryDecodeAsNil() {
x.Subjects = nil
} else {
Expand Down Expand Up @@ -2626,7 +2626,7 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("subject"))
r.EncodeString(codecSelferC_UTF81234, string("subjects"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Subjects == nil {
r.EncodeNil()
Expand Down Expand Up @@ -2768,7 +2768,7 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder)
yyv4 := &x.ObjectMeta
yyv4.CodecDecodeSelf(d)
}
case "subject":
case "subjects":
if r.TryDecodeAsNil() {
x.Subjects = nil
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/rbac/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type RoleBinding struct {
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

// Subjects holds references to the objects the role applies to.
Subjects []Subject `json:"subject" protobuf:"bytes,2,rep,name=subjects"`
Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`

// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
Expand Down Expand Up @@ -136,7 +136,7 @@ type ClusterRoleBinding struct {
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

// Subjects holds references to the objects the role applies to.
Subjects []Subject `json:"subject" protobuf:"bytes,2,rep,name=subjects"`
Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`

// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (ClusterRole) SwaggerDoc() map[string]string {
var map_ClusterRoleBinding = map[string]string{
"": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
"metadata": "Standard object's metadata.",
"subject": "Subjects holds references to the objects the role applies to.",
"subjects": "Subjects holds references to the objects the role applies to.",
"roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
}

Expand Down Expand Up @@ -95,7 +95,7 @@ func (Role) SwaggerDoc() map[string]string {
var map_RoleBinding = map[string]string{
"": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
"metadata": "Standard object's metadata.",
"subject": "Subjects holds references to the objects the role applies to.",
"subjects": "Subjects holds references to the objects the role applies to.",
"roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
}

Expand Down