mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #115487 from tongpu/docs/roleRef_immutable
Add a comment to document that roleRef is immutable
This commit is contained in:
commit
3125009dd1
4
api/openapi-spec/swagger.json
generated
4
api/openapi-spec/swagger.json
generated
@ -12947,7 +12947,7 @@
|
|||||||
},
|
},
|
||||||
"roleRef": {
|
"roleRef": {
|
||||||
"$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef",
|
"$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef",
|
||||||
"description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error."
|
"description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable."
|
||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"description": "Subjects holds references to the objects the role applies to.",
|
"description": "Subjects holds references to the objects the role applies to.",
|
||||||
@ -13132,7 +13132,7 @@
|
|||||||
},
|
},
|
||||||
"roleRef": {
|
"roleRef": {
|
||||||
"$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef",
|
"$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef",
|
||||||
"description": "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."
|
"description": "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. This field is immutable."
|
||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"description": "Subjects holds references to the objects the role applies to.",
|
"description": "Subjects holds references to the objects the role applies to.",
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error."
|
"description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable."
|
||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"description": "Subjects holds references to the objects the role applies to.",
|
"description": "Subjects holds references to the objects the role applies to.",
|
||||||
@ -331,7 +331,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "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."
|
"description": "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. This field is immutable."
|
||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"description": "Subjects holds references to the objects the role applies to.",
|
"description": "Subjects holds references to the objects the role applies to.",
|
||||||
|
@ -115,6 +115,7 @@ type RoleBinding struct {
|
|||||||
|
|
||||||
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
|
// 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.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
RoleRef RoleRef
|
RoleRef RoleRef
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,6 +181,7 @@ type ClusterRoleBinding struct {
|
|||||||
|
|
||||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
// RoleRef can only reference a ClusterRole in the global namespace.
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
RoleRef RoleRef
|
RoleRef RoleRef
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
pkg/generated/openapi/zz_generated.openapi.go
generated
4
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -39870,7 +39870,7 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c
|
|||||||
},
|
},
|
||||||
"roleRef": {
|
"roleRef": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
|
Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/rbac/v1.RoleRef"),
|
Ref: ref("k8s.io/api/rbac/v1.RoleRef"),
|
||||||
},
|
},
|
||||||
@ -40169,7 +40169,7 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O
|
|||||||
},
|
},
|
||||||
"roleRef": {
|
"roleRef": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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.",
|
Description: "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. This field is immutable.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/rbac/v1.RoleRef"),
|
Ref: ref("k8s.io/api/rbac/v1.RoleRef"),
|
||||||
},
|
},
|
||||||
|
@ -66,6 +66,7 @@ message ClusterRoleBinding {
|
|||||||
|
|
||||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
// RoleRef can only reference a ClusterRole in the global namespace.
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
optional RoleRef roleRef = 3;
|
optional RoleRef roleRef = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +141,7 @@ message RoleBinding {
|
|||||||
|
|
||||||
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
|
// 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.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
optional RoleRef roleRef = 3;
|
optional RoleRef roleRef = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ type RoleBinding struct {
|
|||||||
|
|
||||||
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
|
// 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.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,6 +210,7 @@ type ClusterRoleBinding struct {
|
|||||||
|
|
||||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
// RoleRef can only reference a ClusterRole in the global namespace.
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
||||||
|
// This field is immutable.
|
||||||
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ 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.",
|
"": "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.",
|
"metadata": "Standard object's metadata.",
|
||||||
"subjects": "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.",
|
"roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ClusterRoleBinding) SwaggerDoc() map[string]string {
|
func (ClusterRoleBinding) SwaggerDoc() map[string]string {
|
||||||
@ -105,7 +105,7 @@ 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.",
|
"": "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.",
|
"metadata": "Standard object's metadata.",
|
||||||
"subjects": "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.",
|
"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. This field is immutable.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (RoleBinding) SwaggerDoc() map[string]string {
|
func (RoleBinding) SwaggerDoc() map[string]string {
|
||||||
|
Loading…
Reference in New Issue
Block a user