Git Product home page Git Product logo

Comments (9)

k8s-ci-robot avatar k8s-ci-robot commented on July 24, 2024

@kerthcet: The label(s) kind/api-machineary cannot be applied, because the repository doesn't have them.

In response to this:

What would you like to be added?

Currently in eviction API, when violating PDB, we'll have two common errors, see

if pdb.Status.DisruptionsAllowed < 0 {
return errors.NewForbidden(policy.Resource("poddisruptionbudget"), pdb.Name, fmt.Errorf("pdb disruptions allowed is negative"))
}
if len(pdb.Status.DisruptedPods) > MaxDisruptedPodSize {
return errors.NewForbidden(policy.Resource("poddisruptionbudget"), pdb.Name, fmt.Errorf("DisruptedPods map too big - too many evictions not confirmed by PDB controller"))
}
if pdb.Status.DisruptionsAllowed == 0 {
err := errors.NewTooManyRequests("Cannot evict pod as it would violate the pod's disruption budget.", 0)
err.ErrStatus.Details.Causes = append(err.ErrStatus.Details.Causes, metav1.StatusCause{Type: policyv1.DisruptionBudgetCause, Message: fmt.Sprintf("The disruption budget %s needs %d healthy pods and has %d currently", pdb.Name, pdb.Status.DesiredHealthy, pdb.Status.CurrentHealthy)})
return err

We can't easily distinguish them with other forbidden or tooManyRequests errors, we do have different messages but that's not an appropriate criteria for judgement.

When detecting update conflicts, we have a conflict reason for it, maybe we can do the same thing here like A Forbidden status code with different Reasons, have no idea whether this is acceptable. but at least it's feasible because we maintain the status reasons ourself in kubernetes.

/kind api-machineary

Why is this needed?

It would be great if we can tell them when calling eviction API, like in kubernetes/enhancements#4329 (comment), this can be an important metric for users to know the reason why Pods can't be evicted, because of PDB constraints or others.

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-sigs/prow repository.

from kubernetes.

kerthcet avatar kerthcet commented on July 24, 2024

/sig api-machinery

from kubernetes.

atiratree avatar atiratree commented on July 24, 2024

similar issue: #106286

from kubernetes.

seans3 avatar seans3 commented on July 24, 2024

/triage accepted
/help

from kubernetes.

k8s-ci-robot avatar k8s-ci-robot commented on July 24, 2024

@seans3:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

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

In response to this:

/triage accepted
/help

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-sigs/prow repository.

from kubernetes.

seans3 avatar seans3 commented on July 24, 2024

Can someone determine if these two issues are duplicates?

from kubernetes.

JayantDhakajd avatar JayantDhakajd commented on July 24, 2024

Hello and greetings,
I'm a newbie and would like to address the issue as I recently finished learning Go and basic Kubernetes. If possible, could you please provide more insights into the error?
Thanks.

from kubernetes.

varshith257 avatar varshith257 commented on July 24, 2024

/assign
/honk

from kubernetes.

k8s-ci-robot avatar k8s-ci-robot commented on July 24, 2024

@varshith257:
goose image

In response to this:

/assign
/honk

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-sigs/prow repository.

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.