volcano icon indicating copy to clipboard operation
volcano copied to clipboard

Volcano support SidecarContainer

Open Monokaix opened this issue 1 year ago • 9 comments

What would you like to be added:

Add sidecarContainer support for volcano scheduler, which needs volcano scheduler re-compute pod resource requests.

Why is this needed:

SideCarContainer is a beta feature and is enabled by default in k8s v1.29, volcano has not yet adapt the feature, this may cause the scheduler to undercalculate the resources for the pod, and then the kubelet admit failed after the pod is scheduled to the node, because the sidecarcontainer is a new kind of initcontainer, so the pod initialization request resources need to be recalculated.

Refer to:

  1. https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/753-sidecar-containers#resources-calculation-for-scheduling-and-pod-admission
  2. https://github.com/kubernetes/kubernetes/pull/116429

Monokaix avatar Jun 04 '24 09:06 Monokaix

/good-first-issue

Monokaix avatar Jun 04 '24 09:06 Monokaix

@Monokaix: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

volcano-sh-bot avatar Jun 04 '24 09:06 volcano-sh-bot

hey, I would like to work on this /assign

7h3-3mp7y-m4n avatar Jun 04 '24 10:06 7h3-3mp7y-m4n

hey I would like to work on this

babugeet avatar Jun 04 '24 14:06 babugeet

/assign @7h3-3mp7y-m4n

Monokaix avatar Jun 05 '24 07:06 Monokaix

hey, I would like to work on this /assign

You're welcome to do that! And please pay a little attention that this feature is planned to release in next version v1.10, and we should make it merged before that: )

Monokaix avatar Jun 05 '24 07:06 Monokaix

hey I would like to work on this

Very thanks but a little pity that @7h3-3mp7y-m4n has picked this issue first, you can take a look at other issues that you can contribute to: )

Monokaix avatar Jun 05 '24 07:06 Monokaix

hey, I would like to work on this /assign

You're welcome to do that! And please pay a little attention that this feature is planned to release in next version v1.10, and we should make it merged before that: )

Okay, I try my best to complete it ASAP

7h3-3mp7y-m4n avatar Jun 05 '24 07:06 7h3-3mp7y-m4n

@7h3-3mp7y-m4n Hi, there are some main changes need to be done

  • task's initResReq need to be re-calculated and consider sidecar containers, related code https://github.com/volcano-sh/volcano/blob/34836851e6317807267230b1b9508194f81a6f67/pkg/scheduler/api/job_info.go#L114 and https://github.com/volcano-sh/volcano/blob/34836851e6317807267230b1b9508194f81a6f67/pkg/scheduler/api/pod_info.go#L59
  • add a featuregate SidecarContainers in pkg/features to open or close this feature, which should be coordinate with k8s.
  • add ut test with allocate action enabled to test resource fit function, please refer to https://github.com/volcano-sh/volcano/blob/34836851e6317807267230b1b9508194f81a6f67/pkg/scheduler/actions/allocate/allocate.go#L292

Monokaix avatar Jun 17 '24 02:06 Monokaix

/close

Monokaix avatar Sep 12 '24 03:09 Monokaix

@Monokaix: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

volcano-sh-bot avatar Sep 12 '24 03:09 volcano-sh-bot