You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/apis/core/types.go
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2788,11 +2788,17 @@ type ContainerStatus struct {
2788
2788
}
2789
2789
2790
2790
typeResourceStatusstruct {
2791
+
// Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec.
2792
+
// For DRA resources, the value must be "claim:<claim_name>/<request>".
2793
+
// When this status is reported about a container, the "claim_name" and "request" must match one of the claims of this container.
2794
+
// +required
2791
2795
NameResourceName
2792
-
// List of unique Resources health. Each element in the list contains a unique resource ID and resource health.
2793
-
// At a minimum, ResourceID must uniquely identify the Resource
2794
-
// allocated to the Pod on the Node for the lifetime of a Pod.
2795
-
// See ResourceID type for it's definition.
2796
+
// List of unique resources health. Each element in the list contains an unique resource ID and its health.
2797
+
// At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node.
2798
+
// If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share.
2799
+
// See ResourceID type definition for a specific format it has in various use cases.
2800
+
// +listType=map
2801
+
// +listMapKey=resourceID
2796
2802
Resources []ResourceHealth
2797
2803
2798
2804
// allow to extend this struct in future with the overall health fields or things like Device Plugin version
@@ -2801,12 +2807,13 @@ type ResourceStatus struct {
2801
2807
// ResourceID is calculated based on the source of this resource health information.
2802
2808
// For DevicePlugin:
2803
2809
//
2804
-
// deviceplugin:DeviceID, where DeviceID is from the Device structure of DevicePlugin's ListAndWatchResponse type: https://github.com/kubernetes/kubernetes/blob/eda1c780543a27c078450e2f17d674471e00f494/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto#L61-L73
2810
+
// DeviceID, where DeviceID is how device plugin identifies the device. The same DeviceID can be found in PodResources API.
2805
2811
//
2806
2812
// DevicePlugin ID is usually a constant for the lifetime of a Node and typically can be used to uniquely identify the device on the node.
2813
+
//
2807
2814
// For DRA:
2808
2815
//
2809
-
// dra:<driver name>/<pool name>/<device name>: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster.
2816
+
// <driver name>/<pool name>/<device name>: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster.
2810
2817
typeResourceIDstring
2811
2818
2812
2819
typeResourceHealthStatusstring
@@ -2818,7 +2825,7 @@ const (
2818
2825
)
2819
2826
2820
2827
// ResourceHealth represents the health of a resource. It has the latest device health information.
2821
-
// This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.
2828
+
// This is a part of KEP https://kep.k8s.io/4680.
2822
2829
typeResourceHealthstruct {
2823
2830
// ResourceID is the unique identifier of the resource. See the ResourceID type for more information.
// ResourceID is calculated based on the source of this resource health information.
3127
3129
// For DevicePlugin:
3128
3130
//
3129
-
// deviceplugin:DeviceID, where DeviceID is from the Device structure of DevicePlugin's ListAndWatchResponse type: https://github.com/kubernetes/kubernetes/blob/eda1c780543a27c078450e2f17d674471e00f494/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto#L61-L73
3131
+
// DeviceID, where DeviceID is from the Device structure of DevicePlugin's ListAndWatchResponse type: https://github.com/kubernetes/kubernetes/blob/eda1c780543a27c078450e2f17d674471e00f494/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto#L61-L73
3130
3132
//
3131
3133
// DevicePlugin ID is usually a constant for the lifetime of a Node and typically can be used to uniquely identify the device on the node.
3132
3134
// For DRA:
3133
3135
//
3134
-
// dra:<driver name>/<pool name>/<device name>: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster.
3136
+
// <driver name>/<pool name>/<device name>: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster.
3135
3137
typeResourceIDstring
3136
3138
3137
3139
// ResourceHealth represents the health of a resource. It has the latest device health information.
3138
-
// This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.
3140
+
// This is a part of KEP https://kep.k8s.io/4680.
3139
3141
typeResourceHealthstruct {
3140
3142
// ResourceID is the unique identifier of the resource. See the ResourceID type for more information.
0 commit comments