Skip to content

Commit

Permalink
Remove redundant testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Feb 2, 2024
1 parent f8f556d commit c9638a4
Show file tree
Hide file tree
Showing 2 changed files with 409 additions and 528 deletions.
5 changes: 4 additions & 1 deletion pkg/utils/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func Subtract(lhs, rhs v1.ResourceList) v1.ResourceList {
return result
}

// podRequests calculates the max between the sum of container resources and max of initContainers along with sidecar feature consideration
// inspired from https://github.com/kubernetes/kubernetes/blob/e2afa175e4077d767745246662170acd86affeaf/pkg/api/v1/resource/helpers.go#L96
// https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/
// Ceiling calculates the max between the sum of container resources and max of initContainers along with sidecar feature consideration
func podRequests(pod *v1.Pod) v1.ResourceList {
requests := v1.ResourceList{}
restartableInitContainerReqs := v1.ResourceList{}
Expand Down Expand Up @@ -131,6 +131,9 @@ func podRequests(pod *v1.Pod) v1.ResourceList {
return requests
}

// podLimits calculates the max between the sum of container resources and max of initContainers along with sidecar feature consideration
// inspired from https://github.com/kubernetes/kubernetes/blob/e2afa175e4077d767745246662170acd86affeaf/pkg/api/v1/resource/helpers.go#L96
// https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/
func podLimits(pod *v1.Pod) v1.ResourceList {
limits := v1.ResourceList{}
restartableInitContainerLimits := v1.ResourceList{}
Expand Down
Loading

0 comments on commit c9638a4

Please sign in to comment.