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>

Kubernetes-commit: 1dc05009fe7f4e1d139b0c8394683edb54f8d082
This commit is contained in:
Akihiro Suda 2024-03-14 07:21:47 +09:00 committed by Kubernetes Publisher
parent 7ebe0ea60e
commit 00e4609774
5 changed files with 30 additions and 30 deletions

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"):