Skip to content

Commit

Permalink
api: NodeStatus: rename RuntimeClasses to RuntimeHandlers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AkihiroSuda authored and k8s-publishing-bot committed Mar 13, 2024
1 parent 96558b9 commit 30e3187
Show file tree
Hide file tree
Showing 7 changed files with 1,085 additions and 1,085 deletions.
2,080 changes: 1,040 additions & 1,040 deletions core/v1/generated.pb.go

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions core/v1/generated.proto

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

20 changes: 10 additions & 10 deletions core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions core/v1/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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 {
Expand Down
24 changes: 12 additions & 12 deletions core/v1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion testdata/HEAD/core.v1.Node.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
},
"error": "errorValue"
},
"runtimeClasses": [
"runtimeHandlers": [
{
"name": "nameValue",
"features": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/HEAD/core.v1.Node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ status:
osImage: osImageValue
systemUUID: systemUUIDValue
phase: phaseValue
runtimeClasses:
runtimeHandlers:
- features:
recursiveReadOnlyMounts: true
name: nameValue
Expand Down

0 comments on commit 30e3187

Please sign in to comment.