Code Monkey home page Code Monkey logo

Comments (10)

Monokaix avatar Monokaix commented on July 24, 2024

1、volcano admission need generate secrets in a init job, and I will fire a pr to shrink permissions.
2、volcano controller's permissions of list/watch secrets have been removed in latest version.
3、update permission is necessary for volcano controller because it need update pod's podgroup, etc.

from volcano.

kaaass avatar kaaass commented on July 24, 2024

@Monokaix I tried to find all update/patch relate operation to pods. Maybe we only need the patch verb instead of update verb?

_, err = kubeClient.CoreV1().Pods(pod.Namespace).
Patch(context.Background(), pod.Name, k8stypes.StrategicMergePatchType, bytes, metav1.PatchOptions{})

if _, err := pg.kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}); err != nil {

_, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

pod, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

pod, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

from volcano.

lowang-bh avatar lowang-bh commented on July 24, 2024

similar issues : A potential risk in volcano that could lead to takeover of the cluster #3446

from volcano.

Monokaix avatar Monokaix commented on July 24, 2024

@Monokaix I tried to find all update/patch relate operation to pods. Maybe we only need the patch verb instead of update verb?

_, err = kubeClient.CoreV1().Pods(pod.Namespace).
Patch(context.Background(), pod.Name, k8stypes.StrategicMergePatchType, bytes, metav1.PatchOptions{})

if _, err := pg.kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}); err != nil {

_, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

pod, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

pod, err := kubeClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, types.JSONPatchType, []byte(patch), metav1.PatchOptions{})

After a deep insight, volcano scheduler called UpdateStatus method, which needs update verb role: )

from volcano.

Monokaix avatar Monokaix commented on July 24, 2024

And volcano admission related permissions has been reduced in pr #3504

from volcano.

Monokaix avatar Monokaix commented on July 24, 2024

@kaaass I think we can remove update verb in volcano controller, you can do that if you're available: )

from volcano.

kaaass avatar kaaass commented on July 24, 2024

After a deep insight, volcano scheduler called UpdateStatus method, which needs update verb role: )

@Monokaix Thank you for reply : )

UpdateStatus only requires permission to subresource pods/status (client-go source code). Subresource uses a separate permission grants (document).

@kaaass I think we can remove update verb in volcano controller, you can do that if you're available: )

I'm happy to do that! Sadly I'm a little busy at the time. I'll give it a try if it is still unsolved maybe later this week : )

from volcano.

Monokaix avatar Monokaix commented on July 24, 2024

After a deep insight, volcano scheduler called UpdateStatus method, which needs update verb role: )

@Monokaix Thank you for reply : )

UpdateStatus only requires permission to subresource pods/status (client-go source code). Subresource uses a separate permission grants (document).

@kaaass I think we can remove update verb in volcano controller, you can do that if you're available: )

I'm happy to do that! Sadly I'm a little busy at the time. I'll give it a try if it is still unsolved maybe later this week : )

That's ok.

from volcano.

Monokaix avatar Monokaix commented on July 24, 2024

/close

from volcano.

volcano-sh-bot avatar volcano-sh-bot commented on July 24, 2024

@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.

from volcano.

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.