Skip to content

Commit 0e93f35

Browse files
ndixitak8s-publishing-bot
authored andcommitted
API changes for Pod Level Resources
1. Add Resources struct to PodSpec struct in both external and internal API packages 2. Adding feature gate and logic for dropping disabled fields for Pod Level Resources KEP: enhancements/keps/sig-node/2837-pod-level-resource-spec Kubernetes-commit: d7f488b5e341dec8f6ef180f488e788a4103821c
1 parent 84e0db8 commit 0e93f35

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: core/v1/types.go

+14
Original file line numberDiff line numberDiff line change
@@ -4087,6 +4087,20 @@ type PodSpec struct {
40874087
// +featureGate=DynamicResourceAllocation
40884088
// +optional
40894089
ResourceClaims []PodResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,39,rep,name=resourceClaims"`
4090+
// Resources is the total amount of CPU and Memory resources required by all
4091+
// containers in the pod. It supports specifying Requests and Limits for
4092+
// "cpu" and "memory" resource names only. ResourceClaims are not supported.
4093+
//
4094+
// This field enables fine-grained control over resource allocation for the
4095+
// entire pod, allowing resource sharing among containers in a pod.
4096+
// TODO: For beta graduation, expand this comment with a detailed explanation.
4097+
//
4098+
// This is an alpha field and requires enabling the PodLevelResources feature
4099+
// gate.
4100+
//
4101+
// +featureGate=PodLevelResources
4102+
// +optional
4103+
Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,40,opt,name=resources"`
40904104
}
40914105

40924106
// PodResourceClaim references exactly one ResourceClaim, either directly

0 commit comments

Comments
 (0)