"io.k8s.api.core.v1.PodStatus": {
"description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.",
"properties": {
+ "allocatedResources": {
+ "additionalProperties": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
+ },
+ "description": "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.",
+ "type": "object"
+ },
"conditions": {
"description": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
"items": {
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
+ "resources": {
+ "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements",
+ "description": "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources"
+ },
"startTime": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
"description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod."
"io.k8s.api.core.v1.PodStatus": {
"description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.",
"properties": {
+ "allocatedResources": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"
+ },
+ "description": "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.",
+ "type": "object"
+ },
"conditions": {
"description": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
"items": {
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
+ "resources": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"
+ }
+ ],
+ "description": "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources"
+ },
"startTime": {
"allOf": [
{
out.Resize = core.PodResizeStatus(in.Resize)
out.ResourceClaimStatuses = *(*[]core.PodResourceClaimStatus)(unsafe.Pointer(&in.ResourceClaimStatuses))
out.ExtendedResourceClaimStatus = (*core.PodExtendedResourceClaimStatus)(unsafe.Pointer(in.ExtendedResourceClaimStatus))
+ out.AllocatedResources = *(*core.ResourceList)(unsafe.Pointer(&in.AllocatedResources))
+ out.Resources = (*core.ResourceRequirements)(unsafe.Pointer(in.Resources))
return nil
}
out.Resize = corev1.PodResizeStatus(in.Resize)
out.ResourceClaimStatuses = *(*[]corev1.PodResourceClaimStatus)(unsafe.Pointer(&in.ResourceClaimStatuses))
out.ExtendedResourceClaimStatus = (*corev1.PodExtendedResourceClaimStatus)(unsafe.Pointer(in.ExtendedResourceClaimStatus))
+ out.AllocatedResources = *(*corev1.ResourceList)(unsafe.Pointer(&in.AllocatedResources))
+ out.Resources = (*corev1.ResourceRequirements)(unsafe.Pointer(in.Resources))
return nil
}
SetDefaults_ResourceList(&a.Resources.Requests)
}
}
+ SetDefaults_ResourceList(&in.Status.AllocatedResources)
+ if in.Status.Resources != nil {
+ SetDefaults_ResourceList(&in.Status.Resources.Limits)
+ SetDefaults_ResourceList(&in.Status.Resources.Requests)
+ }
}
func SetObjectDefaults_PodList(in *corev1.PodList) {
SetDefaults_ResourceList(&a.Resources.Requests)
}
}
+ SetDefaults_ResourceList(&in.Status.AllocatedResources)
+ if in.Status.Resources != nil {
+ SetDefaults_ResourceList(&in.Status.Resources.Limits)
+ SetDefaults_ResourceList(&in.Status.Resources.Requests)
+ }
}
func SetObjectDefaults_PodTemplate(in *corev1.PodTemplate) {
*out = new(PodExtendedResourceClaimStatus)
(*in).DeepCopyInto(*out)
}
+ if in.AllocatedResources != nil {
+ in, out := &in.AllocatedResources, &out.AllocatedResources
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = new(ResourceRequirements)
+ (*in).DeepCopyInto(*out)
+ }
return
}
Ref: ref(corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName()),
},
},
+ "allocatedResources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref(resource.Quantity{}.OpenAPIModelName()),
+ },
+ },
+ },
+ },
+ },
+ "resources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources",
+ Ref: ref(corev1.ResourceRequirements{}.OpenAPIModelName()),
+ },
+ },
},
},
},
Dependencies: []string{
- corev1.ContainerStatus{}.OpenAPIModelName(), corev1.HostIP{}.OpenAPIModelName(), corev1.PodCondition{}.OpenAPIModelName(), corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(), corev1.PodIP{}.OpenAPIModelName(), corev1.PodResourceClaimStatus{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()},
+ corev1.ContainerStatus{}.OpenAPIModelName(), corev1.HostIP{}.OpenAPIModelName(), corev1.PodCondition{}.OpenAPIModelName(), corev1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(), corev1.PodIP{}.OpenAPIModelName(), corev1.PodResourceClaimStatus{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()},
}
}
_ = i
var l int
_ = l
+ if m.Resources != nil {
+ {
+ size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xa2
+ }
+ if len(m.AllocatedResources) > 0 {
+ keysForAllocatedResources := make([]string, 0, len(m.AllocatedResources))
+ for k := range m.AllocatedResources {
+ keysForAllocatedResources = append(keysForAllocatedResources, string(k))
+ }
+ sort.Strings(keysForAllocatedResources)
+ for iNdEx := len(keysForAllocatedResources) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.AllocatedResources[ResourceName(keysForAllocatedResources[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForAllocatedResources[iNdEx])
+ copy(dAtA[i:], keysForAllocatedResources[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAllocatedResources[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x9a
+ }
+ }
if m.ExtendedResourceClaimStatus != nil {
{
size, err := m.ExtendedResourceClaimStatus.MarshalToSizedBuffer(dAtA[:i])
l = m.ExtendedResourceClaimStatus.Size()
n += 2 + l + sovGenerated(uint64(l))
}
+ if len(m.AllocatedResources) > 0 {
+ for k, v := range m.AllocatedResources {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if m.Resources != nil {
+ l = m.Resources.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
return n
}
repeatedStringForHostIPs += strings.Replace(strings.Replace(f.String(), "HostIP", "HostIP", 1), `&`, ``, 1) + ","
}
repeatedStringForHostIPs += "}"
+ keysForAllocatedResources := make([]string, 0, len(this.AllocatedResources))
+ for k := range this.AllocatedResources {
+ keysForAllocatedResources = append(keysForAllocatedResources, string(k))
+ }
+ sort.Strings(keysForAllocatedResources)
+ mapStringForAllocatedResources := "ResourceList{"
+ for _, k := range keysForAllocatedResources {
+ mapStringForAllocatedResources += fmt.Sprintf("%v: %v,", k, this.AllocatedResources[ResourceName(k)])
+ }
+ mapStringForAllocatedResources += "}"
s := strings.Join([]string{`&PodStatus{`,
`Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
`Conditions:` + repeatedStringForConditions + `,`,
`HostIPs:` + repeatedStringForHostIPs + `,`,
`ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
`ExtendedResourceClaimStatus:` + strings.Replace(this.ExtendedResourceClaimStatus.String(), "PodExtendedResourceClaimStatus", "PodExtendedResourceClaimStatus", 1) + `,`,
+ `AllocatedResources:` + mapStringForAllocatedResources + `,`,
+ `Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
`}`,
}, "")
return s
return err
}
iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllocatedResources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AllocatedResources == nil {
+ m.AllocatedResources = make(ResourceList)
+ }
+ var mapkey ResourceName
+ mapvalue := &resource.Quantity{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.AllocatedResources[ResourceName(mapkey)] = *mapvalue
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resources == nil {
+ m.Resources = &ResourceRequirements{}
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
// +featureGate=DRAExtendedResource
// +optional
optional PodExtendedResourceClaimStatus extendedResourceClaimStatus = 18;
+
+ // AllocatedResources is the total requests allocated for this pod by the node.
+ // If pod-level requests are not set, this will be the total requests aggregated
+ // across containers in the pod.
+ // +featureGate=InPlacePodLevelResourcesVerticalScaling
+ // +optional
+ map<string, .k8s.io.apimachinery.pkg.api.resource.Quantity> allocatedResources = 19;
+
+ // Resources represents the compute resource requests and limits that have been
+ // applied at the pod level if pod-level requests or limits are set in
+ // PodSpec.Resources
+ // +featureGate=InPlacePodLevelResourcesVerticalScaling
+ // +optional
+ optional ResourceRequirements resources = 20;
}
// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
"resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources.",
"resourceClaimStatuses": "Status of resource claims.",
"extendedResourceClaimStatus": "Status of extended resource claim backed by DRA.",
+ "allocatedResources": "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.",
+ "resources": "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources",
}
func (PodStatus) SwaggerDoc() map[string]string {
*out = new(PodExtendedResourceClaimStatus)
(*in).DeepCopyInto(*out)
}
+ if in.AllocatedResources != nil {
+ in, out := &in.AllocatedResources, &out.AllocatedResources
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = new(ResourceRequirements)
+ (*in).DeepCopyInto(*out)
+ }
return
}
}
],
"resourceClaimName": "resourceClaimNameValue"
+ },
+ "allocatedResources": {
+ "allocatedResourcesKey": "0"
+ },
+ "resources": {
+ "limits": {
+ "limitsKey": "0"
+ },
+ "requests": {
+ "requestsKey": "0"
+ },
+ "claims": [
+ {
+ "name": "nameValue",
+ "request": "requestValue"
+ }
+ ]
}
}
}
\ No newline at end of file
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
+ allocatedResources:
+ allocatedResourcesKey: "0"
conditions:
- lastProbeTime: "2003-01-01T01:01:01Z"
lastTransitionTime: "2004-01-01T01:01:01Z"
resourceClaimStatuses:
- name: nameValue
resourceClaimName: resourceClaimNameValue
+ resources:
+ claims:
+ - name: nameValue
+ request: requestValue
+ limits:
+ limitsKey: "0"
+ requests:
+ requestsKey: "0"
startTime: "2007-01-01T01:01:01Z"
}
],
"resourceClaimName": "resourceClaimNameValue"
+ },
+ "allocatedResources": {
+ "allocatedResourcesKey": "0"
+ },
+ "resources": {
+ "limits": {
+ "limitsKey": "0"
+ },
+ "requests": {
+ "requestsKey": "0"
+ },
+ "claims": [
+ {
+ "name": "nameValue",
+ "request": "requestValue"
+ }
+ ]
}
}
}
\ No newline at end of file
selfLink: selfLinkValue
uid: uidValue
status:
+ allocatedResources:
+ allocatedResourcesKey: "0"
conditions:
- lastProbeTime: "2003-01-01T01:01:01Z"
lastTransitionTime: "2004-01-01T01:01:01Z"
resourceClaimStatuses:
- name: nameValue
resourceClaimName: resourceClaimNameValue
+ resources:
+ claims:
+ - name: nameValue
+ request: requestValue
+ limits:
+ limitsKey: "0"
+ requests:
+ requestsKey: "0"
startTime: "2007-01-01T01:01:01Z"
ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
// Status of extended resource claim backed by DRA.
ExtendedResourceClaimStatus *PodExtendedResourceClaimStatusApplyConfiguration `json:"extendedResourceClaimStatus,omitempty"`
+ // AllocatedResources is the total requests allocated for this pod by the node.
+ // If pod-level requests are not set, this will be the total requests aggregated
+ // across containers in the pod.
+ AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"`
+ // Resources represents the compute resource requests and limits that have been
+ // applied at the pod level if pod-level requests or limits are set in
+ // PodSpec.Resources
+ Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
}
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with
b.ExtendedResourceClaimStatus = value
return b
}
+
+// WithAllocatedResources sets the AllocatedResources 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 AllocatedResources field is set to the value of the last call.
+func (b *PodStatusApplyConfiguration) WithAllocatedResources(value corev1.ResourceList) *PodStatusApplyConfiguration {
+ b.AllocatedResources = &value
+ return b
+}
+
+// WithResources sets the Resources 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 Resources field is set to the value of the last call.
+func (b *PodStatusApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *PodStatusApplyConfiguration {
+ b.Resources = value
+ return b
+}
- name: io.k8s.api.core.v1.PodStatus
map:
fields:
+ - name: allocatedResources
+ type:
+ map:
+ elementType:
+ namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: conditions
type:
list:
elementRelationship: associative
keys:
- name
+ - name: resources
+ type:
+ namedType: io.k8s.api.core.v1.ResourceRequirements
- name: startTime
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time