Giter Club home page Giter Club logo

Comments (13)

AxeZhan avatar AxeZhan commented on May 27, 2024 1

I think the hard part of this would be the same as why we can't move validation into staging. Some of those fields may not belong in staging like pod validation opts.

+1
This function relies /pkg/api/v1/pod and PodResourcesOptions and both of them are not in staging.

I'm +1 for having this but I think maybe we need to move both /pkg/api/v1/pod and /pkg/api/v1/resource to component-helpers

from kubernetes.

AxeZhan avatar AxeZhan commented on May 27, 2024 1

I've created #124609 to simply move both /pkg/api/v1/pod and /pkg/api/v1/resource to component-helpers.

To fully solve this problem, we need to replace the function pointed out in #124537 (comment) with the function in component-helpers.

I tend to replace them after #124609 if we all agree the movement, to reduce the complexity of #124609.

from kubernetes.

alculquicondor avatar alculquicondor commented on May 27, 2024

/sig scheduling

from kubernetes.

alculquicondor avatar alculquicondor commented on May 27, 2024

cc @liggitt for any concerns

from kubernetes.

bobbypage avatar bobbypage commented on May 27, 2024

+1, I think this would be helpful to have as a generic library function to generate resource requirements for pods.

from kubernetes.

kannon92 avatar kannon92 commented on May 27, 2024

/sig node

cc @SergeyKanzhelev @gjkim42

from kubernetes.

kannon92 avatar kannon92 commented on May 27, 2024

I think the hard part of this would be the same as why we can't move validation into staging. Some of those fields may not belong in staging like pod validation opts.

from kubernetes.

alculquicondor avatar alculquicondor commented on May 27, 2024

This one is easier. It's based on versioned types.

from kubernetes.

SergeyKanzhelev avatar SergeyKanzhelev commented on May 27, 2024

We also wanted to implement this: #115643

Those are not mutually exclusive, just pointing that for many use cases reading pod status may be a better idea.

from kubernetes.

SergeyKanzhelev avatar SergeyKanzhelev commented on May 27, 2024

btw, this function by itself was a result of the big effort: #115367

from kubernetes.

AxeZhan avatar AxeZhan commented on May 27, 2024

I think kubectl also faces this problem:

func podRequests(pod *corev1.Pod) corev1.ResourceList {

and also in admission:
func podRequests(pod *api.Pod, opts podResourcesOptions) api.ResourceList {

We now maintain this same function in three different places, I'll try if we can merge these three function into one in pkg component-helpers.

from kubernetes.

ffromani avatar ffromani commented on May 27, 2024

/triage accepted

Reusing the same code in scheduler and kubelet would be highly beneficial in quite a few flows

from kubernetes.

AxeZhan avatar AxeZhan commented on May 27, 2024

/assign

from kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.