api: NodeStatus: rename RuntimeClasses to RuntimeHandlers

The runtime classes are apiserver's concept, while the handlers are kubelet's concept.
For NodeStatus, it makes more sense to return the latter ones here.

This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go
- pkg/kubelet/nodestatus/setters.go
- pkg/kubelet/kubelet_node_status.go
- pkg/registry/core/node/strategy.go
- test/e2e_node/mount_rro_linux_test.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2024-03-14 07:21:47 +09:00
parent 4a776f66ec
commit 1dc05009fe
22 changed files with 1207 additions and 1207 deletions

View File

@@ -8225,25 +8225,25 @@
} }
] ]
}, },
"io.k8s.api.core.v1.NodeRuntimeClass": { "io.k8s.api.core.v1.NodeRuntimeHandler": {
"description": "NodeRuntimeClass is a set of runtime class information.", "description": "NodeRuntimeHandler is a set of runtime handler information.",
"properties": { "properties": {
"features": { "features": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeClassFeatures", "$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeHandlerFeatures",
"description": "Supported features." "description": "Supported features."
}, },
"name": { "name": {
"description": "Runtime class name. Empty for the default runtime class.", "description": "Runtime handler name. Empty for the default runtime handler.",
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.NodeRuntimeClassFeatures": { "io.k8s.api.core.v1.NodeRuntimeHandlerFeatures": {
"description": "NodeRuntimeClassFeatures is a set of runtime features.", "description": "NodeRuntimeHandlerFeatures is a set of runtime features.",
"properties": { "properties": {
"recursiveReadOnlyMounts": { "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" "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.", "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" "type": "string"
}, },
"runtimeClasses": { "runtimeHandlers": {
"description": "The available runtime classes.", "description": "The available runtime handlers.",
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeClass" "$ref": "#/definitions/io.k8s.api.core.v1.NodeRuntimeHandler"
}, },
"type": "array", "type": "array",
"x-kubernetes-list-type": "atomic" "x-kubernetes-list-type": "atomic"

View File

@@ -3727,30 +3727,30 @@
} }
] ]
}, },
"io.k8s.api.core.v1.NodeRuntimeClass": { "io.k8s.api.core.v1.NodeRuntimeHandler": {
"description": "NodeRuntimeClass is a set of runtime class information.", "description": "NodeRuntimeHandler is a set of runtime handler information.",
"properties": { "properties": {
"features": { "features": {
"allOf": [ "allOf": [
{ {
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeClassFeatures" "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeHandlerFeatures"
} }
], ],
"description": "Supported features." "description": "Supported features."
}, },
"name": { "name": {
"default": "", "default": "",
"description": "Runtime class name. Empty for the default runtime class.", "description": "Runtime handler name. Empty for the default runtime handler.",
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.NodeRuntimeClassFeatures": { "io.k8s.api.core.v1.NodeRuntimeHandlerFeatures": {
"description": "NodeRuntimeClassFeatures is a set of runtime features.", "description": "NodeRuntimeHandlerFeatures is a set of runtime features.",
"properties": { "properties": {
"recursiveReadOnlyMounts": { "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" "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.", "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" "type": "string"
}, },
"runtimeClasses": { "runtimeHandlers": {
"description": "The available runtime classes.", "description": "The available runtime handlers.",
"items": { "items": {
"allOf": [ "allOf": [
{ {
"$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeClass" "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeRuntimeHandler"
} }
], ],
"default": {} "default": {}

View File

@@ -4833,24 +4833,24 @@ type NodeDaemonEndpoints struct {
KubeletEndpoint DaemonEndpoint KubeletEndpoint DaemonEndpoint
} }
// NodeRuntimeClassFeatures is a set of runtime features. // NodeRuntimeHandlerFeatures is a set of runtime features.
type NodeRuntimeClassFeatures struct { type NodeRuntimeHandlerFeatures struct {
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts. // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
RecursiveReadOnlyMounts *bool RecursiveReadOnlyMounts *bool
// Reserved: UserNamespaces *bool // Reserved: UserNamespaces *bool
} }
// NodeRuntimeClass is a set of runtime class information. // NodeRuntimeHandler is a set of runtime handler information.
type NodeRuntimeClass struct { type NodeRuntimeHandler struct {
// Runtime class name. // Runtime handler name.
// Empty for the default runtime class. // Empty for the default runtime handler.
// +optional // +optional
Name string Name string
// Supported features. // Supported features.
// +optional // +optional
Features *NodeRuntimeClassFeatures Features *NodeRuntimeHandlerFeatures
} }
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node. // 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. // Status of the config assigned to the node via the dynamic Kubelet config feature.
// +optional // +optional
Config *NodeConfigStatus Config *NodeConfigStatus
// The available runtime classes. // The available runtime handlers.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
RuntimeClasses []NodeRuntimeClass RuntimeHandlers []NodeRuntimeHandler
} }
// UniqueVolumeName defines the name of attached volume // UniqueVolumeName defines the name of attached volume

View File

@@ -1062,23 +1062,23 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeClass)(nil), (*core.NodeRuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeHandler)(nil), (*core.NodeRuntimeHandler)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(a.(*v1.NodeRuntimeClass), b.(*core.NodeRuntimeClass), scope) return Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(a.(*v1.NodeRuntimeHandler), b.(*core.NodeRuntimeHandler), scope)
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeClass)(nil), (*v1.NodeRuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeHandler)(nil), (*v1.NodeRuntimeHandler)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(a.(*core.NodeRuntimeClass), b.(*v1.NodeRuntimeClass), scope) return Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(a.(*core.NodeRuntimeHandler), b.(*v1.NodeRuntimeHandler), scope)
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeClassFeatures)(nil), (*core.NodeRuntimeClassFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*v1.NodeRuntimeHandlerFeatures)(nil), (*core.NodeRuntimeHandlerFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(a.(*v1.NodeRuntimeClassFeatures), b.(*core.NodeRuntimeClassFeatures), scope) return Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(a.(*v1.NodeRuntimeHandlerFeatures), b.(*core.NodeRuntimeHandlerFeatures), scope)
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeClassFeatures)(nil), (*v1.NodeRuntimeClassFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*core.NodeRuntimeHandlerFeatures)(nil), (*v1.NodeRuntimeHandlerFeatures)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(a.(*core.NodeRuntimeClassFeatures), b.(*v1.NodeRuntimeClassFeatures), scope) return Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(a.(*core.NodeRuntimeHandlerFeatures), b.(*v1.NodeRuntimeHandlerFeatures), scope)
}); err != nil { }); err != nil {
return err 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) 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.Name = in.Name
out.Features = (*core.NodeRuntimeClassFeatures)(unsafe.Pointer(in.Features)) out.Features = (*core.NodeRuntimeHandlerFeatures)(unsafe.Pointer(in.Features))
return nil return nil
} }
// Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass is an autogenerated conversion function. // Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler is an autogenerated conversion function.
func Convert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(in *v1.NodeRuntimeClass, out *core.NodeRuntimeClass, s conversion.Scope) error { func Convert_v1_NodeRuntimeHandler_To_core_NodeRuntimeHandler(in *v1.NodeRuntimeHandler, out *core.NodeRuntimeHandler, s conversion.Scope) error {
return autoConvert_v1_NodeRuntimeClass_To_core_NodeRuntimeClass(in, out, s) 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.Name = in.Name
out.Features = (*v1.NodeRuntimeClassFeatures)(unsafe.Pointer(in.Features)) out.Features = (*v1.NodeRuntimeHandlerFeatures)(unsafe.Pointer(in.Features))
return nil return nil
} }
// Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass is an autogenerated conversion function. // Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler is an autogenerated conversion function.
func Convert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(in *core.NodeRuntimeClass, out *v1.NodeRuntimeClass, s conversion.Scope) error { func Convert_core_NodeRuntimeHandler_To_v1_NodeRuntimeHandler(in *core.NodeRuntimeHandler, out *v1.NodeRuntimeHandler, s conversion.Scope) error {
return autoConvert_core_NodeRuntimeClass_To_v1_NodeRuntimeClass(in, out, s) 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)) out.RecursiveReadOnlyMounts = (*bool)(unsafe.Pointer(in.RecursiveReadOnlyMounts))
return nil return nil
} }
// Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures is an autogenerated conversion function. // Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures is an autogenerated conversion function.
func Convert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(in *v1.NodeRuntimeClassFeatures, out *core.NodeRuntimeClassFeatures, s conversion.Scope) error { func Convert_v1_NodeRuntimeHandlerFeatures_To_core_NodeRuntimeHandlerFeatures(in *v1.NodeRuntimeHandlerFeatures, out *core.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
return autoConvert_v1_NodeRuntimeClassFeatures_To_core_NodeRuntimeClassFeatures(in, out, s) 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)) out.RecursiveReadOnlyMounts = (*bool)(unsafe.Pointer(in.RecursiveReadOnlyMounts))
return nil return nil
} }
// Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures is an autogenerated conversion function. // Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures is an autogenerated conversion function.
func Convert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(in *core.NodeRuntimeClassFeatures, out *v1.NodeRuntimeClassFeatures, s conversion.Scope) error { func Convert_core_NodeRuntimeHandlerFeatures_To_v1_NodeRuntimeHandlerFeatures(in *core.NodeRuntimeHandlerFeatures, out *v1.NodeRuntimeHandlerFeatures, s conversion.Scope) error {
return autoConvert_core_NodeRuntimeClassFeatures_To_v1_NodeRuntimeClassFeatures(in, out, s) 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 { 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.VolumesInUse = *(*[]core.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
out.VolumesAttached = *(*[]core.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached)) out.VolumesAttached = *(*[]core.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
out.Config = (*core.NodeConfigStatus)(unsafe.Pointer(in.Config)) 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 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.VolumesInUse = *(*[]v1.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
out.VolumesAttached = *(*[]v1.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached)) out.VolumesAttached = *(*[]v1.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
out.Config = (*v1.NodeConfigStatus)(unsafe.Pointer(in.Config)) 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 return nil
} }

View File

@@ -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. // 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 *out = *in
if in.Features != nil { if in.Features != nil {
in, out := &in.Features, &out.Features in, out := &in.Features, &out.Features
*out = new(NodeRuntimeClassFeatures) *out = new(NodeRuntimeHandlerFeatures)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClass. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler.
func (in *NodeRuntimeClass) DeepCopy() *NodeRuntimeClass { func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler {
if in == nil { if in == nil {
return nil return nil
} }
out := new(NodeRuntimeClass) out := new(NodeRuntimeHandler)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // 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 *out = *in
if in.RecursiveReadOnlyMounts != nil { if in.RecursiveReadOnlyMounts != nil {
in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts
@@ -2787,12 +2787,12 @@ func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures)
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClassFeatures. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures.
func (in *NodeRuntimeClassFeatures) DeepCopy() *NodeRuntimeClassFeatures { func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures {
if in == nil { if in == nil {
return nil return nil
} }
out := new(NodeRuntimeClassFeatures) out := new(NodeRuntimeHandlerFeatures)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
@@ -2957,9 +2957,9 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
*out = new(NodeConfigStatus) *out = new(NodeConfigStatus)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
if in.RuntimeClasses != nil { if in.RuntimeHandlers != nil {
in, out := &in.RuntimeClasses, &out.RuntimeClasses in, out := &in.RuntimeHandlers, &out.RuntimeHandlers
*out = make([]NodeRuntimeClass, len(*in)) *out = make([]NodeRuntimeHandler, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }

View File

@@ -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.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.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.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.NodeRuntimeHandler": schema_k8sio_api_core_v1_NodeRuntimeHandler(ref),
"k8s.io/api/core/v1.NodeRuntimeClassFeatures": schema_k8sio_api_core_v1_NodeRuntimeClassFeatures(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.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.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref),
"k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(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{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NodeRuntimeClass is a set of runtime class information.", Description: "NodeRuntimeHandler is a set of runtime handler information.",
Type: []string{"object"}, Type: []string{"object"},
Properties: map[string]spec.Schema{ Properties: map[string]spec.Schema{
"name": { "name": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Runtime class name. Empty for the default runtime class.", Description: "Runtime handler name. Empty for the default runtime handler.",
Default: "", Default: "",
Type: []string{"string"}, Type: []string{"string"},
Format: "", Format: "",
@@ -24440,27 +24440,27 @@ func schema_k8sio_api_core_v1_NodeRuntimeClass(ref common.ReferenceCallback) com
"features": { "features": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Supported features.", Description: "Supported features.",
Ref: ref("k8s.io/api/core/v1.NodeRuntimeClassFeatures"), Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ 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{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NodeRuntimeClassFeatures is a set of runtime features.", Description: "NodeRuntimeHandlerFeatures is a set of runtime features.",
Type: []string{"object"}, Type: []string{"object"},
Properties: map[string]spec.Schema{ Properties: map[string]spec.Schema{
"recursiveReadOnlyMounts": { "recursiveReadOnlyMounts": {
SchemaProps: spec.SchemaProps{ 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"}, Type: []string{"boolean"},
Format: "", 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"), Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"),
}, },
}, },
"runtimeClasses": { "runtimeHandlers": {
VendorExtensible: spec.VendorExtensible{ VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{ Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic", "x-kubernetes-list-type": "atomic",
}, },
}, },
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "The available runtime classes.", Description: "The available runtime handlers.",
Type: []string{"array"}, Type: []string{"array"},
Items: &spec.SchemaOrArray{ Items: &spec.SchemaOrArray{
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, 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{ 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"},
} }
} }

View File

@@ -741,7 +741,7 @@ func (kl *Kubelet) defaultNodeStatusFuncs() []func(context.Context, *v1.Node) er
nodestatus.DaemonEndpoints(kl.daemonEndpoints), nodestatus.DaemonEndpoints(kl.daemonEndpoints),
nodestatus.Images(kl.nodeStatusMaxImages, kl.imageManager.GetImageList), nodestatus.Images(kl.nodeStatusMaxImages, kl.imageManager.GetImageList),
nodestatus.GoRuntime(), nodestatus.GoRuntime(),
nodestatus.RuntimeClasses(kl.runtimeState.runtimeHandlers), nodestatus.RuntimeHandlers(kl.runtimeState.runtimeHandlers),
) )
// Volume limits // Volume limits
setters = append(setters, nodestatus.VolumeLimits(kl.volumePluginMgr.ListVolumePluginWithLimits)) setters = append(setters, nodestatus.VolumeLimits(kl.volumePluginMgr.ListVolumePluginWithLimits))

View File

@@ -480,18 +480,18 @@ func GoRuntime() Setter {
} }
} }
// RuntimeClasses returns a Setter that sets RuntimeClasses on the node. // RuntimeHandlers returns a Setter that sets RuntimeHandlers on the node.
func RuntimeClasses(fn func() []kubecontainer.RuntimeHandler) Setter { func RuntimeHandlers(fn func() []kubecontainer.RuntimeHandler) Setter {
return func(ctx context.Context, node *v1.Node) error { return func(ctx context.Context, node *v1.Node) error {
if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) { if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) {
return nil return nil
} }
handlers := fn() handlers := fn()
node.Status.RuntimeClasses = make([]v1.NodeRuntimeClass, len(handlers)) node.Status.RuntimeHandlers = make([]v1.NodeRuntimeHandler, len(handlers))
for i, h := range handlers { for i, h := range handlers {
node.Status.RuntimeClasses[i] = v1.NodeRuntimeClass{ node.Status.RuntimeHandlers[i] = v1.NodeRuntimeHandler{
Name: h.Name, Name: h.Name,
Features: &v1.NodeRuntimeClassFeatures{ Features: &v1.NodeRuntimeHandlerFeatures{
RecursiveReadOnlyMounts: &h.SupportsRecursiveReadOnlyMounts, RecursiveReadOnlyMounts: &h.SupportsRecursiveReadOnlyMounts,
}, },
} }

View File

@@ -104,7 +104,7 @@ func dropDisabledFields(node *api.Node, oldNode *api.Node) {
} }
if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) { if !utilfeature.DefaultFeatureGate.Enabled(features.RecursiveReadOnlyMounts) {
node.Status.RuntimeClasses = nil node.Status.RuntimeHandlers = nil
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -2599,21 +2599,21 @@ message NodeProxyOptions {
optional string path = 1; optional string path = 1;
} }
// NodeRuntimeClass is a set of runtime class information. // NodeRuntimeHandler is a set of runtime handler information.
message NodeRuntimeClass { message NodeRuntimeHandler {
// Runtime class name. // Runtime handler name.
// Empty for the default runtime class. // Empty for the default runtime handler.
// +optional // +optional
optional string name = 1; optional string name = 1;
// Supported features. // Supported features.
// +optional // +optional
optional NodeRuntimeClassFeatures features = 2; optional NodeRuntimeHandlerFeatures features = 2;
} }
// NodeRuntimeClassFeatures is a set of runtime features. // NodeRuntimeHandlerFeatures is a set of runtime features.
message NodeRuntimeClassFeatures { message NodeRuntimeHandlerFeatures {
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts. // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
optional bool recursiveReadOnlyMounts = 1; optional bool recursiveReadOnlyMounts = 1;
@@ -2775,11 +2775,11 @@ message NodeStatus {
// +optional // +optional
optional NodeConfigStatus config = 11; optional NodeConfigStatus config = 11;
// The available runtime classes. // The available runtime handlers.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
// +listType=atomic // +listType=atomic
repeated NodeRuntimeClass runtimeClasses = 12; repeated NodeRuntimeHandler runtimeHandlers = 12;
} }
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node. // NodeSystemInfo is a set of ids/uuids to uniquely identify the node.

View File

@@ -5769,24 +5769,24 @@ type NodeDaemonEndpoints struct {
KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"` KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"`
} }
// NodeRuntimeClassFeatures is a set of runtime features. // NodeRuntimeHandlerFeatures is a set of runtime features.
type NodeRuntimeClassFeatures struct { type NodeRuntimeHandlerFeatures struct {
// RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts. // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"` RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"`
// Reserved: UserNamespaces *bool (varint 2, for consistency with CRI API) // Reserved: UserNamespaces *bool (varint 2, for consistency with CRI API)
} }
// NodeRuntimeClass is a set of runtime class information. // NodeRuntimeHandler is a set of runtime handler information.
type NodeRuntimeClass struct { type NodeRuntimeHandler struct {
// Runtime class name. // Runtime handler name.
// Empty for the default runtime class. // Empty for the default runtime handler.
// +optional // +optional
Name string `json:"name" protobuf:"bytes,1,opt,name=name"` Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// Supported features. // Supported features.
// +optional // +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. // 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. // Status of the config assigned to the node via the dynamic Kubelet config feature.
// +optional // +optional
Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"`
// The available runtime classes. // The available runtime handlers.
// +featureGate=RecursiveReadOnlyMounts // +featureGate=RecursiveReadOnlyMounts
// +optional // +optional
// +listType=atomic // +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 type UniqueVolumeName string

View File

@@ -1214,23 +1214,23 @@ func (NodeProxyOptions) SwaggerDoc() map[string]string {
return map_NodeProxyOptions return map_NodeProxyOptions
} }
var map_NodeRuntimeClass = map[string]string{ var map_NodeRuntimeHandler = map[string]string{
"": "NodeRuntimeClass is a set of runtime class information.", "": "NodeRuntimeHandler is a set of runtime handler information.",
"name": "Runtime class name. Empty for the default runtime class.", "name": "Runtime handler name. Empty for the default runtime handler.",
"features": "Supported features.", "features": "Supported features.",
} }
func (NodeRuntimeClass) SwaggerDoc() map[string]string { func (NodeRuntimeHandler) SwaggerDoc() map[string]string {
return map_NodeRuntimeClass return map_NodeRuntimeHandler
} }
var map_NodeRuntimeClassFeatures = map[string]string{ var map_NodeRuntimeHandlerFeatures = map[string]string{
"": "NodeRuntimeClassFeatures is a set of runtime features.", "": "NodeRuntimeHandlerFeatures is a set of runtime features.",
"recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime class supports RecursiveReadOnlyMounts.", "recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.",
} }
func (NodeRuntimeClassFeatures) SwaggerDoc() map[string]string { func (NodeRuntimeHandlerFeatures) SwaggerDoc() map[string]string {
return map_NodeRuntimeClassFeatures return map_NodeRuntimeHandlerFeatures
} }
var map_NodeSelector = map[string]string{ 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.", "volumesInUse": "List of attachable volumes in use (mounted) by the node.",
"volumesAttached": "List of volumes that are attached to 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.", "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 { func (NodeStatus) SwaggerDoc() map[string]string {

View File

@@ -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. // 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 *out = *in
if in.Features != nil { if in.Features != nil {
in, out := &in.Features, &out.Features in, out := &in.Features, &out.Features
*out = new(NodeRuntimeClassFeatures) *out = new(NodeRuntimeHandlerFeatures)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClass. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler.
func (in *NodeRuntimeClass) DeepCopy() *NodeRuntimeClass { func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler {
if in == nil { if in == nil {
return nil return nil
} }
out := new(NodeRuntimeClass) out := new(NodeRuntimeHandler)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // 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 *out = *in
if in.RecursiveReadOnlyMounts != nil { if in.RecursiveReadOnlyMounts != nil {
in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts
@@ -2785,12 +2785,12 @@ func (in *NodeRuntimeClassFeatures) DeepCopyInto(out *NodeRuntimeClassFeatures)
return return
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeClassFeatures. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures.
func (in *NodeRuntimeClassFeatures) DeepCopy() *NodeRuntimeClassFeatures { func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures {
if in == nil { if in == nil {
return nil return nil
} }
out := new(NodeRuntimeClassFeatures) out := new(NodeRuntimeHandlerFeatures)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
@@ -2955,9 +2955,9 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
*out = new(NodeConfigStatus) *out = new(NodeConfigStatus)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
if in.RuntimeClasses != nil { if in.RuntimeHandlers != nil {
in, out := &in.RuntimeClasses, &out.RuntimeClasses in, out := &in.RuntimeHandlers, &out.RuntimeHandlers
*out = make([]NodeRuntimeClass, len(*in)) *out = make([]NodeRuntimeHandler, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }

View File

@@ -157,7 +157,7 @@
}, },
"error": "errorValue" "error": "errorValue"
}, },
"runtimeClasses": [ "runtimeHandlers": [
{ {
"name": "nameValue", "name": "nameValue",
"features": { "features": {

View File

@@ -108,7 +108,7 @@ status:
osImage: osImageValue osImage: osImageValue
systemUUID: systemUUIDValue systemUUID: systemUUIDValue
phase: phaseValue phase: phaseValue
runtimeClasses: runtimeHandlers:
- features: - features:
recursiveReadOnlyMounts: true recursiveReadOnlyMounts: true
name: nameValue name: nameValue

View File

@@ -18,23 +18,23 @@ limitations under the License.
package v1 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. // with apply.
type NodeRuntimeClassApplyConfiguration struct { type NodeRuntimeHandlerApplyConfiguration struct {
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
Features *NodeRuntimeClassFeaturesApplyConfiguration `json:"features,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. // apply.
func NodeRuntimeClass() *NodeRuntimeClassApplyConfiguration { func NodeRuntimeHandler() *NodeRuntimeHandlerApplyConfiguration {
return &NodeRuntimeClassApplyConfiguration{} return &NodeRuntimeHandlerApplyConfiguration{}
} }
// WithName sets the Name field in the declarative configuration to the given value // 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. // 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. // 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 b.Name = &value
return b 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 // 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. // 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. // 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 b.Features = value
return b return b
} }

View File

@@ -18,22 +18,22 @@ limitations under the License.
package v1 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. // with apply.
type NodeRuntimeClassFeaturesApplyConfiguration struct { type NodeRuntimeHandlerFeaturesApplyConfiguration struct {
RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"` 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. // apply.
func NodeRuntimeClassFeatures() *NodeRuntimeClassFeaturesApplyConfiguration { func NodeRuntimeHandlerFeatures() *NodeRuntimeHandlerFeaturesApplyConfiguration {
return &NodeRuntimeClassFeaturesApplyConfiguration{} return &NodeRuntimeHandlerFeaturesApplyConfiguration{}
} }
// WithRecursiveReadOnlyMounts sets the RecursiveReadOnlyMounts field in the declarative configuration to the given value // 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. // 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. // 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 b.RecursiveReadOnlyMounts = &value
return b return b
} }

View File

@@ -36,7 +36,7 @@ type NodeStatusApplyConfiguration struct {
VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"` VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"`
VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"`
Config *NodeConfigStatusApplyConfiguration `json:"config,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 // NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with
@@ -155,15 +155,15 @@ func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyCo
return b 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. // 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. // If called multiple times, values provided by each call will be appended to the RuntimeHandlers field.
func (b *NodeStatusApplyConfiguration) WithRuntimeClasses(values ...*NodeRuntimeClassApplyConfiguration) *NodeStatusApplyConfiguration { func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration {
for i := range values { for i := range values {
if values[i] == nil { 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 return b
} }

View File

@@ -6073,17 +6073,17 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
namedType: io.k8s.api.core.v1.DaemonEndpoint namedType: io.k8s.api.core.v1.DaemonEndpoint
default: {} default: {}
- name: io.k8s.api.core.v1.NodeRuntimeClass - name: io.k8s.api.core.v1.NodeRuntimeHandler
map: map:
fields: fields:
- name: features - name: features
type: type:
namedType: io.k8s.api.core.v1.NodeRuntimeClassFeatures namedType: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures
- name: name - name: name
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.core.v1.NodeRuntimeClassFeatures - name: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures
map: map:
fields: fields:
- name: recursiveReadOnlyMounts - name: recursiveReadOnlyMounts
@@ -6211,11 +6211,11 @@ var schemaYAML = typed.YAMLObject(`types:
- name: phase - name: phase
type: type:
scalar: string scalar: string
- name: runtimeClasses - name: runtimeHandlers
type: type:
list: list:
elementType: elementType:
namedType: io.k8s.api.core.v1.NodeRuntimeClass namedType: io.k8s.api.core.v1.NodeRuntimeHandler
elementRelationship: atomic elementRelationship: atomic
- name: volumesAttached - name: volumesAttached
type: type:

View File

@@ -801,10 +801,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.NodeConfigStatusApplyConfiguration{} return &applyconfigurationscorev1.NodeConfigStatusApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("NodeDaemonEndpoints"): case corev1.SchemeGroupVersion.WithKind("NodeDaemonEndpoints"):
return &applyconfigurationscorev1.NodeDaemonEndpointsApplyConfiguration{} return &applyconfigurationscorev1.NodeDaemonEndpointsApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClass"): case corev1.SchemeGroupVersion.WithKind("NodeRuntimeHandler"):
return &applyconfigurationscorev1.NodeRuntimeClassApplyConfiguration{} return &applyconfigurationscorev1.NodeRuntimeHandlerApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClassFeatures"): case corev1.SchemeGroupVersion.WithKind("NodeRuntimeHandlerFeatures"):
return &applyconfigurationscorev1.NodeRuntimeClassFeaturesApplyConfiguration{} return &applyconfigurationscorev1.NodeRuntimeHandlerFeaturesApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("NodeSelector"): case corev1.SchemeGroupVersion.WithKind("NodeSelector"):
return &applyconfigurationscorev1.NodeSelectorApplyConfiguration{} return &applyconfigurationscorev1.NodeSelectorApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("NodeSelectorRequirement"): case corev1.SchemeGroupVersion.WithKind("NodeSelectorRequirement"):

View File

@@ -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. // Assuming that there is only one node, because this is a node e2e test.
gomega.Expect(nodeList.Items).To(gomega.HaveLen(1)) gomega.Expect(nodeList.Items).To(gomega.HaveLen(1))
node := nodeList.Items[0] 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 { if f.Name == "" && f.Features != nil && *f.Features.RecursiveReadOnlyMounts {
return true return true
} }