mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #123909 from AkihiroSuda/fix-123906
kubelet: fix mixing up runtime classes with runtime handlers
This commit is contained in:
commit
6ef2fec0df
20
api/openapi-spec/swagger.json
generated
20
api/openapi-spec/swagger.json
generated
@ -8225,25 +8225,25 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"io.k8s.api.core.v1.NodeRuntimeClass": {
|
||||
"description": "NodeRuntimeClass is a set of runtime class information.",
|
||||
"io.k8s.api.core.v1.NodeRuntimeHandler": {
|
||||
"description": "NodeRuntimeHandler is a set of runtime handler information.",
|
||||
"properties": {
|
||||
"features": {
|
||||
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeClassFeatures",
|
||||
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeHandlerFeatures",
|
||||
"description": "Supported features."
|
||||
},
|
||||
"name": {
|
||||
"description": "Runtime class name. Empty for the default runtime class.",
|
||||
"description": "Runtime handler name. Empty for the default runtime handler.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.api.core.v1.NodeRuntimeClassFeatures": {
|
||||
"description": "NodeRuntimeClassFeatures is a set of runtime features.",
|
||||
"io.k8s.api.core.v1.NodeRuntimeHandlerFeatures": {
|
||||
"description": "NodeRuntimeHandlerFeatures is a set of runtime features.",
|
||||
"properties": {
|
||||
"recursiveReadOnlyMounts": {
|
||||
"description": "RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.",
|
||||
"description": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
@ -8426,10 +8426,10 @@
|
||||
"description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.",
|
||||
"type": "string"
|
||||
},
|
||||
"runtimeClasses": {
|
||||
"description": "The available runtime classes.",
|
||||
"runtimeHandlers": {
|
||||
"description": "The available runtime handlers.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeClass"
|
||||
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeHandler"
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
|
@ -3727,30 +3727,30 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"io.k8s.api.core.v1.NodeRuntimeClass": {
|
||||
"description": "NodeRuntimeClass is a set of runtime class information.",
|
||||
"io.k8s.api.core.v1.NodeRuntimeHandler": {
|
||||
"description": "NodeRuntimeHandler is a set of runtime handler information.",
|
||||
"properties": {
|
||||
"features": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeClassFeatures"
|
||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeHandlerFeatures"
|
||||
}
|
||||
],
|
||||
"description": "Supported features."
|
||||
},
|
||||
"name": {
|
||||
"default": "",
|
||||
"description": "Runtime class name. Empty for the default runtime class.",
|
||||
"description": "Runtime handler name. Empty for the default runtime handler.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.api.core.v1.NodeRuntimeClassFeatures": {
|
||||
"description": "NodeRuntimeClassFeatures is a set of runtime features.",
|
||||
"io.k8s.api.core.v1.NodeRuntimeHandlerFeatures": {
|
||||
"description": "NodeRuntimeHandlerFeatures is a set of runtime features.",
|
||||
"properties": {
|
||||
"recursiveReadOnlyMounts": {
|
||||
"description": "RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.",
|
||||
"description": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
@ -3990,12 +3990,12 @@
|
||||
"description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.",
|
||||
"type": "string"
|
||||
},
|
||||
"runtimeClasses": {
|
||||
"description": "The available runtime classes.",
|
||||
"runtimeHandlers": {
|
||||
"description": "The available runtime handlers.",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeClass"
|
||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeHandler"
|
||||
}
|
||||
],
|
||||
"default": {}
|
||||
|
@ -4833,24 +4833,24 @@ type NodeDaemonEndpoints struct {
|
||||
KubeletEndpoint DaemonEndpoint
|
||||
}
|
||||
|
||||
// NodeRuntimeClassFeatures is a set of runtime features.
|
||||
type NodeRuntimeClassFeatures struct {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.
|
||||
// NodeRuntimeHandlerFeatures is a set of runtime features.
|
||||
type NodeRuntimeHandlerFeatures struct {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
RecursiveReadOnlyMounts *bool
|
||||
// Reserved: UserNamespaces *bool
|
||||
}
|
||||
|
||||
// NodeRuntimeClass is a set of runtime class information.
|
||||
type NodeRuntimeClass struct {
|
||||
// Runtime class name.
|
||||
// Empty for the default runtime class.
|
||||
// NodeRuntimeHandler is a set of runtime handler information.
|
||||
type NodeRuntimeHandler struct {
|
||||
// Runtime handler name.
|
||||
// Empty for the default runtime handler.
|
||||
// +optional
|
||||
Name string
|
||||
// Supported features.
|
||||
// +optional
|
||||
Features *NodeRuntimeClassFeatures
|
||||
Features *NodeRuntimeHandlerFeatures
|
||||
}
|
||||
|
||||
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
|
||||
@ -4963,10 +4963,10 @@ type NodeStatus struct {
|
||||
// Status of the config assigned to the node via the dynamic Kubelet config feature.
|
||||
// +optional
|
||||
Config *NodeConfigStatus
|
||||
// The available runtime classes.
|
||||
// The available runtime handlers.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
RuntimeClasses []NodeRuntimeClass
|
||||
RuntimeHandlers []NodeRuntimeHandler
|
||||
}
|
||||
|
||||
// UniqueVolumeName defines the name of attached volume
|
||||
|
56
pkg/apis/core/v1/zz_generated.conversion.go
generated
56
pkg/apis/core/v1/zz_generated.conversion.go
generated
@ -1062,23 +1062,23 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeClass)(nil), (*core.NodeRuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(a.(*v1.NodeRuntimeClass), b.(*core.NodeRuntimeClass), scope)
|
||||
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeHandler)(nil), (*core.NodeRuntimeHandler)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(a.(*v1.NodeRuntimeHandler), b.(*core.NodeRuntimeHandler), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeClass)(nil), (*v1.NodeRuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(a.(*core.NodeRuntimeClass), b.(*v1.NodeRuntimeClass), scope)
|
||||
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeHandler)(nil), (*v1.NodeRuntimeHandler)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(a.(*core.NodeRuntimeHandler), b.(*v1.NodeRuntimeHandler), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeClassFeatures)(nil), (*core.NodeRuntimeClassFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(a.(*v1.NodeRuntimeClassFeatures), b.(*core.NodeRuntimeClassFeatures), scope)
|
||||
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeHandlerFeatures)(nil), (*core.NodeRuntimeHandlerFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(a.(*v1.NodeRuntimeHandlerFeatures), b.(*core.NodeRuntimeHandlerFeatures), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeClassFeatures)(nil), (*v1.NodeRuntimeClassFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(a.(*core.NodeRuntimeClassFeatures), b.(*v1.NodeRuntimeClassFeatures), scope)
|
||||
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeHandlerFeatures)(nil), (*v1.NodeRuntimeHandlerFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(a.(*core.NodeRuntimeHandlerFeatures), b.(*v1.NodeRuntimeHandlerFeatures), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -5103,46 +5103,46 @@ func Convert_url_Values_To_v1_NodeProxyOptions(in *url.Values, out *v1.NodeProxy
|
||||
return autoConvert_url_Values_To_v1_NodeProxyOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(in *v1.NodeRuntimeClass, out *core.NodeRuntimeClass, s conversion.Scope) error {
|
||||
func autoConvert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(in *v1.NodeRuntimeHandler, out *core.NodeRuntimeHandler, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.Features = (*core.NodeRuntimeClassFeatures)(unsafe.Pointer(in.Features))
|
||||
out.Features = (*core.NodeRuntimeHandlerFeatures)(unsafe.Pointer(in.Features))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass is an autogenerated conversion function.
|
||||
func Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(in *v1.NodeRuntimeClass, out *core.NodeRuntimeClass, s conversion.Scope) error {
|
||||
return autoConvert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(in, out, s)
|
||||
// Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler is an autogenerated conversion function.
|
||||
func Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(in *v1.NodeRuntimeHandler, out *core.NodeRuntimeHandler, s conversion.Scope) error {
|
||||
return autoConvert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(in *core.NodeRuntimeClass, out *v1.NodeRuntimeClass, s conversion.Scope) error {
|
||||
func autoConvert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(in *core.NodeRuntimeHandler, out *v1.NodeRuntimeHandler, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.Features = (*v1.NodeRuntimeClassFeatures)(unsafe.Pointer(in.Features))
|
||||
out.Features = (*v1.NodeRuntimeHandlerFeatures)(unsafe.Pointer(in.Features))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass is an autogenerated conversion function.
|
||||
func Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(in *core.NodeRuntimeClass, out *v1.NodeRuntimeClass, s conversion.Scope) error {
|
||||
return autoConvert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(in, out, s)
|
||||
// Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler is an autogenerated conversion function.
|
||||
func Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(in *core.NodeRuntimeHandler, out *v1.NodeRuntimeHandler, s conversion.Scope) error {
|
||||
return autoConvert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(in *v1.NodeRuntimeClassFeatures, out *core.NodeRuntimeClassFeatures, s conversion.Scope) error {
|
||||
func autoConvert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(in *v1.NodeRuntimeHandlerFeatures, out *core.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
|
||||
out.RecursiveReadOnlyMounts = (*bool)(unsafe.Pointer(in.RecursiveReadOnlyMounts))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures is an autogenerated conversion function.
|
||||
func Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(in *v1.NodeRuntimeClassFeatures, out *core.NodeRuntimeClassFeatures, s conversion.Scope) error {
|
||||
return autoConvert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(in, out, s)
|
||||
// Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures is an autogenerated conversion function.
|
||||
func Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(in *v1.NodeRuntimeHandlerFeatures, out *core.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
|
||||
return autoConvert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(in *core.NodeRuntimeClassFeatures, out *v1.NodeRuntimeClassFeatures, s conversion.Scope) error {
|
||||
func autoConvert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(in *core.NodeRuntimeHandlerFeatures, out *v1.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
|
||||
out.RecursiveReadOnlyMounts = (*bool)(unsafe.Pointer(in.RecursiveReadOnlyMounts))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures is an autogenerated conversion function.
|
||||
func Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(in *core.NodeRuntimeClassFeatures, out *v1.NodeRuntimeClassFeatures, s conversion.Scope) error {
|
||||
return autoConvert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(in, out, s)
|
||||
// Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures is an autogenerated conversion function.
|
||||
func Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(in *core.NodeRuntimeHandlerFeatures, out *v1.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
|
||||
return autoConvert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NodeSelector_To_core_NodeSelector(in *v1.NodeSelector, out *core.NodeSelector, s conversion.Scope) error {
|
||||
@ -5248,7 +5248,7 @@ func autoConvert_v1_NodeStatus_To_core_NodeStatus(in *v1.NodeStatus, out *core.N
|
||||
out.VolumesInUse = *(*[]core.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
|
||||
out.VolumesAttached = *(*[]core.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
|
||||
out.Config = (*core.NodeConfigStatus)(unsafe.Pointer(in.Config))
|
||||
out.RuntimeClasses = *(*[]core.NodeRuntimeClass)(unsafe.Pointer(&in.RuntimeClasses))
|
||||
out.RuntimeHandlers = *(*[]core.NodeRuntimeHandler)(unsafe.Pointer(&in.RuntimeHandlers))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5273,7 +5273,7 @@ func autoConvert_core_NodeStatus_To_v1_NodeStatus(in *core.NodeStatus, out *v1.N
|
||||
out.VolumesInUse = *(*[]v1.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
|
||||
out.VolumesAttached = *(*[]v1.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
|
||||
out.Config = (*v1.NodeConfigStatus)(unsafe.Pointer(in.Config))
|
||||
out.RuntimeClasses = *(*[]v1.NodeRuntimeClass)(unsafe.Pointer(&in.RuntimeClasses))
|
||||
out.RuntimeHandlers = *(*[]v1.NodeRuntimeHandler)(unsafe.Pointer(&in.RuntimeHandlers))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
24
pkg/apis/core/zz_generated.deepcopy.go
generated
24
pkg/apis/core/zz_generated.deepcopy.go
generated
@ -2756,28 +2756,28 @@ func (in *NodeProxyOptions) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeRuntimeClass) DeepCopyInto(out *NodeRuntimeClass) {
|
||||
func (in *NodeRuntimeHandler) DeepCopyInto(out *NodeRuntimeHandler) {
|
||||
*out = *in
|
||||
if in.Features != nil {
|
||||
in, out := &in.Features, &out.Features
|
||||
*out = new(NodeRuntimeClassFeatures)
|
||||
*out = new(NodeRuntimeHandlerFeatures)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClass.
|
||||
func (in *NodeRuntimeClass) DeepCopy() *NodeRuntimeClass {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler.
|
||||
func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeRuntimeClass)
|
||||
out := new(NodeRuntimeHandler)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures) {
|
||||
func (in *NodeRuntimeHandlerFeatures) DeepCopyInto(out *NodeRuntimeHandlerFeatures) {
|
||||
*out = *in
|
||||
if in.RecursiveReadOnlyMounts != nil {
|
||||
in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts
|
||||
@ -2787,12 +2787,12 @@ func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClassFeatures.
|
||||
func (in *NodeRuntimeClassFeatures) DeepCopy() *NodeRuntimeClassFeatures {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures.
|
||||
func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeRuntimeClassFeatures)
|
||||
out := new(NodeRuntimeHandlerFeatures)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
@ -2957,9 +2957,9 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
|
||||
*out = new(NodeConfigStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.RuntimeClasses != nil {
|
||||
in, out := &in.RuntimeClasses, &out.RuntimeClasses
|
||||
*out = make([]NodeRuntimeClass, len(*in))
|
||||
if in.RuntimeHandlers != nil {
|
||||
in, out := &in.RuntimeHandlers, &out.RuntimeHandlers
|
||||
*out = make([]NodeRuntimeHandler, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
|
28
pkg/generated/openapi/zz_generated.openapi.go
generated
28
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -479,8 +479,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref),
|
||||
"k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref),
|
||||
"k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref),
|
||||
"k8s.io/api/core/v1.NodeRuntimeClass": schema_k8sio_api_core_v1_NodeRuntimeClass(ref),
|
||||
"k8s.io/api/core/v1.NodeRuntimeClassFeatures": schema_k8sio_api_core_v1_NodeRuntimeClassFeatures(ref),
|
||||
"k8s.io/api/core/v1.NodeRuntimeHandler": schema_k8sio_api_core_v1_NodeRuntimeHandler(ref),
|
||||
"k8s.io/api/core/v1.NodeRuntimeHandlerFeatures": schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref),
|
||||
"k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref),
|
||||
"k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref),
|
||||
"k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref),
|
||||
@ -24422,16 +24422,16 @@ func schema_k8sio_api_core_v1_NodeProxyOptions(ref common.ReferenceCallback) com
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_core_v1_NodeRuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_k8sio_api_core_v1_NodeRuntimeHandler(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "NodeRuntimeClass is a set of runtime class information.",
|
||||
Description: "NodeRuntimeHandler is a set of runtime handler information.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"name": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Runtime class name. Empty for the default runtime class.",
|
||||
Description: "Runtime handler name. Empty for the default runtime handler.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
@ -24440,27 +24440,27 @@ func schema_k8sio_api_core_v1_NodeRuntimeClass(ref common.ReferenceCallback) com
|
||||
"features": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Supported features.",
|
||||
Ref: ref("k8s.io/api/core/v1.NodeRuntimeClassFeatures"),
|
||||
Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/core/v1.NodeRuntimeClassFeatures"},
|
||||
"k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_core_v1_NodeRuntimeClassFeatures(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "NodeRuntimeClassFeatures is a set of runtime features.",
|
||||
Description: "NodeRuntimeHandlerFeatures is a set of runtime features.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"recursiveReadOnlyMounts": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.",
|
||||
Description: "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.",
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
@ -24878,20 +24878,20 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op
|
||||
Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"),
|
||||
},
|
||||
},
|
||||
"runtimeClasses": {
|
||||
"runtimeHandlers": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The available runtime classes.",
|
||||
Description: "The available runtime handlers.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/core/v1.NodeRuntimeClass"),
|
||||
Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandler"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -24901,7 +24901,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeRuntimeClass", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
|
||||
"k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeRuntimeHandler", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -741,7 +741,7 @@ func (kl *Kubelet) defaultNodeStatusFuncs() []func(context.Context, *v1.Node) er
|
||||
nodestatus.DaemonEndpoints(kl.daemonEndpoints),
|
||||
nodestatus.Images(kl.nodeStatusMaxImages, kl.imageManager.GetImageList),
|
||||
nodestatus.GoRuntime(),
|
||||
nodestatus.RuntimeClasses(kl.runtimeState.runtimeHandlers),
|
||||
nodestatus.RuntimeHandlers(kl.runtimeState.runtimeHandlers),
|
||||
)
|
||||
// Volume limits
|
||||
setters = append(setters, nodestatus.VolumeLimits(kl.volumePluginMgr.ListVolumePluginWithLimits))
|
||||
|
@ -2445,23 +2445,32 @@ func (kl *Kubelet) cleanupOrphanedPodCgroups(pcm cm.PodContainerManager, cgroupP
|
||||
}
|
||||
|
||||
func (kl *Kubelet) runtimeClassSupportsRecursiveReadOnlyMounts(pod *v1.Pod) bool {
|
||||
var runtimeClassName string
|
||||
if pod.Spec.RuntimeClassName != nil {
|
||||
runtimeClassName = *pod.Spec.RuntimeClassName
|
||||
if kl.runtimeClassManager == nil {
|
||||
return false
|
||||
}
|
||||
runtimeHandlerName, err := kl.runtimeClassManager.LookupRuntimeHandler(pod.Spec.RuntimeClassName)
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "failed to look up the runtime handler", "runtimeClassName", pod.Spec.RuntimeClassName)
|
||||
return false
|
||||
}
|
||||
runtimeHandlers := kl.runtimeState.runtimeHandlers()
|
||||
return runtimeClassSupportsRecursiveReadOnlyMounts(runtimeClassName, runtimeHandlers)
|
||||
return runtimeHandlerSupportsRecursiveReadOnlyMounts(runtimeHandlerName, runtimeHandlers)
|
||||
}
|
||||
|
||||
// runtimeClassSupportsRecursiveReadOnlyMounts checks whether the runtime class supports recursive read-only mounts.
|
||||
// runtimeHandlerSupportsRecursiveReadOnlyMounts checks whether the runtime handler supports recursive read-only mounts.
|
||||
// The kubelet feature gate is not checked here.
|
||||
func runtimeClassSupportsRecursiveReadOnlyMounts(runtimeClassName string, runtimeHandlers []kubecontainer.RuntimeHandler) bool {
|
||||
func runtimeHandlerSupportsRecursiveReadOnlyMounts(runtimeHandlerName string, runtimeHandlers []kubecontainer.RuntimeHandler) bool {
|
||||
if len(runtimeHandlers) == 0 {
|
||||
// The runtime does not support returning the handler list.
|
||||
// No need to print a warning here.
|
||||
return false
|
||||
}
|
||||
for _, h := range runtimeHandlers {
|
||||
if h.Name == runtimeClassName {
|
||||
if h.Name == runtimeHandlerName {
|
||||
return h.SupportsRecursiveReadOnlyMounts
|
||||
}
|
||||
}
|
||||
klog.ErrorS(nil, "unknown runtime class", "runtimeClassName", runtimeClassName)
|
||||
klog.ErrorS(nil, "Unknown runtime handler", "runtimeHandlerName", runtimeHandlerName)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxLinuxConfig(pod *v1.Pod) (
|
||||
if sc.RunAsGroup != nil && runtime.GOOS != "windows" {
|
||||
lc.SecurityContext.RunAsGroup = &runtimeapi.Int64Value{Value: int64(*sc.RunAsGroup)}
|
||||
}
|
||||
namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper)
|
||||
namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper, m.runtimeClassManager)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Po
|
||||
}
|
||||
|
||||
// set namespace options and supplemental groups.
|
||||
namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper)
|
||||
namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper, m.runtimeClassManager)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -97,12 +97,21 @@ func PidNamespaceForPod(pod *v1.Pod) runtimeapi.NamespaceMode {
|
||||
return runtimeapi.NamespaceMode_CONTAINER
|
||||
}
|
||||
|
||||
// LookupRuntimeHandler is implemented by *runtimeclass.Manager.
|
||||
type RuntimeHandlerResolver interface {
|
||||
LookupRuntimeHandler(runtimeClassName *string) (string, error)
|
||||
}
|
||||
|
||||
// namespacesForPod returns the runtimeapi.NamespaceOption for a given pod.
|
||||
// An empty or nil pod can be used to get the namespace defaults for v1.Pod.
|
||||
func NamespacesForPod(pod *v1.Pod, runtimeHelper kubecontainer.RuntimeHelper) (*runtimeapi.NamespaceOption, error) {
|
||||
func NamespacesForPod(pod *v1.Pod, runtimeHelper kubecontainer.RuntimeHelper, rcManager RuntimeHandlerResolver) (*runtimeapi.NamespaceOption, error) {
|
||||
runtimeHandler := ""
|
||||
if pod != nil && pod.Spec.RuntimeClassName != nil {
|
||||
runtimeHandler = *pod.Spec.RuntimeClassName
|
||||
if pod != nil && rcManager != nil {
|
||||
var err error
|
||||
runtimeHandler, err = rcManager.LookupRuntimeHandler(pod.Spec.RuntimeClassName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
userNs, err := runtimeHelper.GetOrCreateUserNamespaceMappings(pod, runtimeHandler)
|
||||
if err != nil {
|
||||
|
@ -223,7 +223,7 @@ func TestNamespacesForPod(t *testing.T) {
|
||||
},
|
||||
} {
|
||||
t.Run(desc, func(t *testing.T) {
|
||||
actual, err := NamespacesForPod(test.input, &kubecontainertest.FakeRuntimeHelper{})
|
||||
actual, err := NamespacesForPod(test.input, &kubecontainertest.FakeRuntimeHelper{}, nil)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, test.expected, actual)
|
||||
})
|
||||
|
@ -480,18 +480,18 @@ func GoRuntime() Setter {
|
||||
}
|
||||
}
|
||||
|
||||
// RuntimeClasses returns a Setter that sets RuntimeClasses on the node.
|
||||
func RuntimeClasses(fn func() []kubecontainer.RuntimeHandler) Setter {
|
||||
// RuntimeHandlers returns a Setter that sets RuntimeHandlers on the node.
|
||||
func RuntimeHandlers(fn func() []kubecontainer.RuntimeHandler) Setter {
|
||||
return func(ctx context.Context, node *v1.Node) error {
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) {
|
||||
return nil
|
||||
}
|
||||
handlers := fn()
|
||||
node.Status.RuntimeClasses = make([]v1.NodeRuntimeClass, len(handlers))
|
||||
node.Status.RuntimeHandlers = make([]v1.NodeRuntimeHandler, len(handlers))
|
||||
for i, h := range handlers {
|
||||
node.Status.RuntimeClasses[i] = v1.NodeRuntimeClass{
|
||||
node.Status.RuntimeHandlers[i] = v1.NodeRuntimeHandler{
|
||||
Name: h.Name,
|
||||
Features: &v1.NodeRuntimeClassFeatures{
|
||||
Features: &v1.NodeRuntimeHandlerFeatures{
|
||||
RecursiveReadOnlyMounts: &h.SupportsRecursiveReadOnlyMounts,
|
||||
},
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ func dropDisabledFields(node *api.Node, oldNode *api.Node) {
|
||||
}
|
||||
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) {
|
||||
node.Status.RuntimeClasses = nil
|
||||
node.Status.RuntimeHandlers = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
2080
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
2080
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@ -2599,21 +2599,21 @@ message NodeProxyOptions {
|
||||
optional string path = 1;
|
||||
}
|
||||
|
||||
// NodeRuntimeClass is a set of runtime class information.
|
||||
message NodeRuntimeClass {
|
||||
// Runtime class name.
|
||||
// Empty for the default runtime class.
|
||||
// NodeRuntimeHandler is a set of runtime handler information.
|
||||
message NodeRuntimeHandler {
|
||||
// Runtime handler name.
|
||||
// Empty for the default runtime handler.
|
||||
// +optional
|
||||
optional string name = 1;
|
||||
|
||||
// Supported features.
|
||||
// +optional
|
||||
optional NodeRuntimeClassFeatures features = 2;
|
||||
optional NodeRuntimeHandlerFeatures features = 2;
|
||||
}
|
||||
|
||||
// NodeRuntimeClassFeatures is a set of runtime features.
|
||||
message NodeRuntimeClassFeatures {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.
|
||||
// NodeRuntimeHandlerFeatures is a set of runtime features.
|
||||
message NodeRuntimeHandlerFeatures {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
optional bool recursiveReadOnlyMounts = 1;
|
||||
@ -2775,11 +2775,11 @@ message NodeStatus {
|
||||
// +optional
|
||||
optional NodeConfigStatus config = 11;
|
||||
|
||||
// The available runtime classes.
|
||||
// The available runtime handlers.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated NodeRuntimeClass runtimeClasses = 12;
|
||||
repeated NodeRuntimeHandler runtimeHandlers = 12;
|
||||
}
|
||||
|
||||
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
|
||||
|
@ -5769,24 +5769,24 @@ type NodeDaemonEndpoints struct {
|
||||
KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"`
|
||||
}
|
||||
|
||||
// NodeRuntimeClassFeatures is a set of runtime features.
|
||||
type NodeRuntimeClassFeatures struct {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.
|
||||
// NodeRuntimeHandlerFeatures is a set of runtime features.
|
||||
type NodeRuntimeHandlerFeatures struct {
|
||||
// RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"`
|
||||
// Reserved: UserNamespaces *bool (varint 2, for consistency with CRI API)
|
||||
}
|
||||
|
||||
// NodeRuntimeClass is a set of runtime class information.
|
||||
type NodeRuntimeClass struct {
|
||||
// Runtime class name.
|
||||
// Empty for the default runtime class.
|
||||
// NodeRuntimeHandler is a set of runtime handler information.
|
||||
type NodeRuntimeHandler struct {
|
||||
// Runtime handler name.
|
||||
// Empty for the default runtime handler.
|
||||
// +optional
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Supported features.
|
||||
// +optional
|
||||
Features *NodeRuntimeClassFeatures `json:"features,omitempty" protobuf:"bytes,2,opt,name=features"`
|
||||
Features *NodeRuntimeHandlerFeatures `json:"features,omitempty" protobuf:"bytes,2,opt,name=features"`
|
||||
}
|
||||
|
||||
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
|
||||
@ -5925,11 +5925,11 @@ type NodeStatus struct {
|
||||
// Status of the config assigned to the node via the dynamic Kubelet config feature.
|
||||
// +optional
|
||||
Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"`
|
||||
// The available runtime classes.
|
||||
// The available runtime handlers.
|
||||
// +featureGate=RecursiveReadOnlyMounts
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
RuntimeClasses []NodeRuntimeClass `json:"runtimeClasses,omitempty" protobuf:"bytes,12,rep,name=runtimeClasses"`
|
||||
RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" protobuf:"bytes,12,rep,name=runtimeHandlers"`
|
||||
}
|
||||
|
||||
type UniqueVolumeName string
|
||||
|
@ -1214,23 +1214,23 @@ func (NodeProxyOptions) SwaggerDoc() map[string]string {
|
||||
return map_NodeProxyOptions
|
||||
}
|
||||
|
||||
var map_NodeRuntimeClass = map[string]string{
|
||||
"": "NodeRuntimeClass is a set of runtime class information.",
|
||||
"name": "Runtime class name. Empty for the default runtime class.",
|
||||
var map_NodeRuntimeHandler = map[string]string{
|
||||
"": "NodeRuntimeHandler is a set of runtime handler information.",
|
||||
"name": "Runtime handler name. Empty for the default runtime handler.",
|
||||
"features": "Supported features.",
|
||||
}
|
||||
|
||||
func (NodeRuntimeClass) SwaggerDoc() map[string]string {
|
||||
return map_NodeRuntimeClass
|
||||
func (NodeRuntimeHandler) SwaggerDoc() map[string]string {
|
||||
return map_NodeRuntimeHandler
|
||||
}
|
||||
|
||||
var map_NodeRuntimeClassFeatures = map[string]string{
|
||||
"": "NodeRuntimeClassFeatures is a set of runtime features.",
|
||||
"recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.",
|
||||
var map_NodeRuntimeHandlerFeatures = map[string]string{
|
||||
"": "NodeRuntimeHandlerFeatures is a set of runtime features.",
|
||||
"recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.",
|
||||
}
|
||||
|
||||
func (NodeRuntimeClassFeatures) SwaggerDoc() map[string]string {
|
||||
return map_NodeRuntimeClassFeatures
|
||||
func (NodeRuntimeHandlerFeatures) SwaggerDoc() map[string]string {
|
||||
return map_NodeRuntimeHandlerFeatures
|
||||
}
|
||||
|
||||
var map_NodeSelector = map[string]string{
|
||||
@ -1291,7 +1291,7 @@ var map_NodeStatus = map[string]string{
|
||||
"volumesInUse": "List of attachable volumes in use (mounted) by the node.",
|
||||
"volumesAttached": "List of volumes that are attached to the node.",
|
||||
"config": "Status of the config assigned to the node via the dynamic Kubelet config feature.",
|
||||
"runtimeClasses": "The available runtime classes.",
|
||||
"runtimeHandlers": "The available runtime handlers.",
|
||||
}
|
||||
|
||||
func (NodeStatus) SwaggerDoc() map[string]string {
|
||||
|
@ -2754,28 +2754,28 @@ func (in *NodeProxyOptions) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeRuntimeClass) DeepCopyInto(out *NodeRuntimeClass) {
|
||||
func (in *NodeRuntimeHandler) DeepCopyInto(out *NodeRuntimeHandler) {
|
||||
*out = *in
|
||||
if in.Features != nil {
|
||||
in, out := &in.Features, &out.Features
|
||||
*out = new(NodeRuntimeClassFeatures)
|
||||
*out = new(NodeRuntimeHandlerFeatures)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClass.
|
||||
func (in *NodeRuntimeClass) DeepCopy() *NodeRuntimeClass {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler.
|
||||
func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeRuntimeClass)
|
||||
out := new(NodeRuntimeHandler)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures) {
|
||||
func (in *NodeRuntimeHandlerFeatures) DeepCopyInto(out *NodeRuntimeHandlerFeatures) {
|
||||
*out = *in
|
||||
if in.RecursiveReadOnlyMounts != nil {
|
||||
in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts
|
||||
@ -2785,12 +2785,12 @@ func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClassFeatures.
|
||||
func (in *NodeRuntimeClassFeatures) DeepCopy() *NodeRuntimeClassFeatures {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures.
|
||||
func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeRuntimeClassFeatures)
|
||||
out := new(NodeRuntimeHandlerFeatures)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
@ -2955,9 +2955,9 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
|
||||
*out = new(NodeConfigStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.RuntimeClasses != nil {
|
||||
in, out := &in.RuntimeClasses, &out.RuntimeClasses
|
||||
*out = make([]NodeRuntimeClass, len(*in))
|
||||
if in.RuntimeHandlers != nil {
|
||||
in, out := &in.RuntimeHandlers, &out.RuntimeHandlers
|
||||
*out = make([]NodeRuntimeHandler, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
|
@ -157,7 +157,7 @@
|
||||
},
|
||||
"error": "errorValue"
|
||||
},
|
||||
"runtimeClasses": [
|
||||
"runtimeHandlers": [
|
||||
{
|
||||
"name": "nameValue",
|
||||
"features": {
|
||||
|
@ -108,7 +108,7 @@ status:
|
||||
osImage: osImageValue
|
||||
systemUUID: systemUUIDValue
|
||||
phase: phaseValue
|
||||
runtimeClasses:
|
||||
runtimeHandlers:
|
||||
- features:
|
||||
recursiveReadOnlyMounts: true
|
||||
name: nameValue
|
||||
|
@ -18,23 +18,23 @@ limitations under the License.
|
||||
|
||||
package v1
|
||||
|
||||
// NodeRuntimeClassApplyConfiguration represents an declarative configuration of the NodeRuntimeClass type for use
|
||||
// NodeRuntimeHandlerApplyConfiguration represents an declarative configuration of the NodeRuntimeHandler type for use
|
||||
// with apply.
|
||||
type NodeRuntimeClassApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Features *NodeRuntimeClassFeaturesApplyConfiguration `json:"features,omitempty"`
|
||||
type NodeRuntimeHandlerApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Features *NodeRuntimeHandlerFeaturesApplyConfiguration `json:"features,omitempty"`
|
||||
}
|
||||
|
||||
// NodeRuntimeClassApplyConfiguration constructs an declarative configuration of the NodeRuntimeClass type for use with
|
||||
// NodeRuntimeHandlerApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandler type for use with
|
||||
// apply.
|
||||
func NodeRuntimeClass() *NodeRuntimeClassApplyConfiguration {
|
||||
return &NodeRuntimeClassApplyConfiguration{}
|
||||
func NodeRuntimeHandler() *NodeRuntimeHandlerApplyConfiguration {
|
||||
return &NodeRuntimeHandlerApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassApplyConfiguration) WithName(value string) *NodeRuntimeClassApplyConfiguration {
|
||||
func (b *NodeRuntimeHandlerApplyConfiguration) WithName(value string) *NodeRuntimeHandlerApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
@ -42,7 +42,7 @@ func (b *NodeRuntimeClassApplyConfiguration) WithName(value string) *NodeRuntime
|
||||
// WithFeatures sets the Features field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Features field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassApplyConfiguration) WithFeatures(value *NodeRuntimeClassFeaturesApplyConfiguration) *NodeRuntimeClassApplyConfiguration {
|
||||
func (b *NodeRuntimeHandlerApplyConfiguration) WithFeatures(value *NodeRuntimeHandlerFeaturesApplyConfiguration) *NodeRuntimeHandlerApplyConfiguration {
|
||||
b.Features = value
|
||||
return b
|
||||
}
|
@ -18,22 +18,22 @@ limitations under the License.
|
||||
|
||||
package v1
|
||||
|
||||
// NodeRuntimeClassFeaturesApplyConfiguration represents an declarative configuration of the NodeRuntimeClassFeatures type for use
|
||||
// NodeRuntimeHandlerFeaturesApplyConfiguration represents an declarative configuration of the NodeRuntimeHandlerFeatures type for use
|
||||
// with apply.
|
||||
type NodeRuntimeClassFeaturesApplyConfiguration struct {
|
||||
type NodeRuntimeHandlerFeaturesApplyConfiguration struct {
|
||||
RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"`
|
||||
}
|
||||
|
||||
// NodeRuntimeClassFeaturesApplyConfiguration constructs an declarative configuration of the NodeRuntimeClassFeatures type for use with
|
||||
// NodeRuntimeHandlerFeaturesApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandlerFeatures type for use with
|
||||
// apply.
|
||||
func NodeRuntimeClassFeatures() *NodeRuntimeClassFeaturesApplyConfiguration {
|
||||
return &NodeRuntimeClassFeaturesApplyConfiguration{}
|
||||
func NodeRuntimeHandlerFeatures() *NodeRuntimeHandlerFeaturesApplyConfiguration {
|
||||
return &NodeRuntimeHandlerFeaturesApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRecursiveReadOnlyMounts sets the RecursiveReadOnlyMounts field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RecursiveReadOnlyMounts field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassFeaturesApplyConfiguration) WithRecursiveReadOnlyMounts(value bool) *NodeRuntimeClassFeaturesApplyConfiguration {
|
||||
func (b *NodeRuntimeHandlerFeaturesApplyConfiguration) WithRecursiveReadOnlyMounts(value bool) *NodeRuntimeHandlerFeaturesApplyConfiguration {
|
||||
b.RecursiveReadOnlyMounts = &value
|
||||
return b
|
||||
}
|
@ -36,7 +36,7 @@ type NodeStatusApplyConfiguration struct {
|
||||
VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"`
|
||||
VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"`
|
||||
Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"`
|
||||
RuntimeClasses []NodeRuntimeClassApplyConfiguration `json:"runtimeClasses,omitempty"`
|
||||
RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"`
|
||||
}
|
||||
|
||||
// NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with
|
||||
@ -155,15 +155,15 @@ func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyCo
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuntimeClasses adds the given value to the RuntimeClasses field in the declarative configuration
|
||||
// WithRuntimeHandlers adds the given value to the RuntimeHandlers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RuntimeClasses field.
|
||||
func (b *NodeStatusApplyConfiguration) WithRuntimeClasses(values ...*NodeRuntimeClassApplyConfiguration) *NodeStatusApplyConfiguration {
|
||||
// If called multiple times, values provided by each call will be appended to the RuntimeHandlers field.
|
||||
func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRuntimeClasses")
|
||||
panic("nil value passed to WithRuntimeHandlers")
|
||||
}
|
||||
b.RuntimeClasses = append(b.RuntimeClasses, *values[i])
|
||||
b.RuntimeHandlers = append(b.RuntimeHandlers, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -6073,17 +6073,17 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.DaemonEndpoint
|
||||
default: {}
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeClass
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeHandler
|
||||
map:
|
||||
fields:
|
||||
- name: features
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeClassFeatures
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeClassFeatures
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures
|
||||
map:
|
||||
fields:
|
||||
- name: recursiveReadOnlyMounts
|
||||
@ -6211,11 +6211,11 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: phase
|
||||
type:
|
||||
scalar: string
|
||||
- name: runtimeClasses
|
||||
- name: runtimeHandlers
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeClass
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeHandler
|
||||
elementRelationship: atomic
|
||||
- name: volumesAttached
|
||||
type:
|
||||
|
@ -801,10 +801,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.NodeConfigStatusApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeDaemonEndpoints"):
|
||||
return &applyconfigurationscorev1.NodeDaemonEndpointsApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClass"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeClassApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClassFeatures"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeClassFeaturesApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeHandler"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeHandlerApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeHandlerFeatures"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeHandlerFeaturesApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeSelector"):
|
||||
return &applyconfigurationscorev1.NodeSelectorApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeSelectorRequirement"):
|
||||
|
@ -231,7 +231,7 @@ func supportsRRO(ctx context.Context, f *framework.Framework) bool {
|
||||
// Assuming that there is only one node, because this is a node e2e test.
|
||||
gomega.Expect(nodeList.Items).To(gomega.HaveLen(1))
|
||||
node := nodeList.Items[0]
|
||||
for _, f := range node.Status.RuntimeClasses {
|
||||
for _, f := range node.Status.RuntimeHandlers {
|
||||
if f.Name == "" && f.Features != nil && *f.Features.RecursiveReadOnlyMounts {
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user