Skip to content

Support warnings in webhook utils #1788

Closed

Description

@fabxc

The admission package supports returning warnings on webhook requests through Response.WithWarnings.
It seems one cannot make use of the utility interfaces and constructors if one wants to respond warnings. So one would end up re-implementing a bunch of the logic.

To not break the existing API, a specific error type could be used which is introspected by the existing utility logic. For an only-warnings error, an Allowed response would be returned.

This could be surfaced through 2 simple functions:

// Triggers an Allowed response with warnings.
func Warnings(...string) error

// Triggers a Denied response with the given error and additional warnings.
func ErrorAndWarnings(error, ...string) error

Activity

  1. k8s-triage-robot commented on May 1, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  2. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on May 1, 2022
  3. k8s-triage-robot commented on May 31, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle rotten

  4. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on May 31, 2022
  5. invidian commented on May 31, 2022

    @invidian

    /remove-lifecycle rotten

  6. removed
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    on May 31, 2022
  7. k8s-triage-robot commented on Aug 29, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  8. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Aug 29, 2022
  9. invidian commented on Aug 29, 2022

    @invidian

    /remove-lifecycle stale

  10. removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Aug 29, 2022
  11. k8s-triage-robot commented on Nov 27, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  12. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Nov 27, 2022
  13. k8s-triage-robot commented on Dec 27, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle rotten

  14. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Dec 27, 2022
  15. invidian commented on Jan 2, 2023

    @invidian

    /remove-lifecycle rotten

  16. removed
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    on Jan 2, 2023
  17. k8s-triage-robot commented on Apr 2, 2023

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

    This bot triages un-triaged issues according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue as fresh with /remove-lifecycle stale
    • Close this issue with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  18. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Apr 2, 2023
  19. invidian commented on Apr 2, 2023

    @invidian

    /remove-lifecycle stale

  20. removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Apr 2, 2023
  21. sbueringer commented on Apr 22, 2023

    @sbueringer
    Member

    /close

    As

    It seems one cannot make use of the utility interfaces and constructors if one wants to respond warnings.

    Is now possible after #2014 was merged

  22. k8s-ci-robot commented on Apr 22, 2023

    @k8s-ci-robot
    Contributor

    @sbueringer: Closing this issue.

    Details

    In response to this:

    /close

    As

    It seems one cannot make use of the utility interfaces and constructors if one wants to respond warnings.

    Is now possible after #2014 was merged

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions