Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make webhook retry backoff parameters configurable #95705

Merged
merged 3 commits into from Nov 2, 2020

Conversation

tkashem
Copy link
Contributor

@tkashem tkashem commented Oct 19, 2020

What type of PR is this?

/kind bug

What this PR does / why we need it:
Currently webhook retry backoff parameters are hard coded, we want to have the ability to configure the backoff parameters for webhook retry logic.

The objective of this PR is to make the backoff parameters configurable only. So the default that is being used today should still be in effect.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 19, 2020
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 19, 2020
@k8s-ci-robot k8s-ci-robot added the sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. label Oct 19, 2020
@tkashem
Copy link
Contributor Author

tkashem commented Oct 19, 2020

/retest

@tkashem tkashem force-pushed the webhook-retry branch 3 times, most recently from 1f3d9eb to af47846 Compare October 20, 2020 01:14
@tkashem
Copy link
Contributor Author

tkashem commented Oct 20, 2020

/retest

2 similar comments
@tkashem
Copy link
Contributor Author

tkashem commented Oct 20, 2020

/retest

@tkashem
Copy link
Contributor Author

tkashem commented Oct 20, 2020

/retest

@tkashem
Copy link
Contributor Author

tkashem commented Oct 20, 2020

/retest

@fedebongio
Copy link
Contributor

/assign @deads2k
/triage accepted

@tkashem
Copy link
Contributor Author

tkashem commented Oct 30, 2020

/retest

1 similar comment
@tkashem
Copy link
Contributor Author

tkashem commented Oct 30, 2020

/retest

@tkashem
Copy link
Contributor Author

tkashem commented Oct 30, 2020

/retest

@deads2k
Copy link
Contributor

deads2k commented Oct 30, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2020
@sjenning
Copy link
Contributor

/approve

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2020
Currently webhook retry backoff parameters are hard coded, we want
to have the ability to configure the backoff parameters for webhook
retry logic.
@k8s-ci-robot k8s-ci-robot added area/cloudprovider and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 1, 2020
@sttts
Copy link
Contributor

sttts commented Nov 2, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2020
Comment on lines +40 to +41
// DefaultAuthWebhookRetryBackoff is the default backoff parameters for
// both authentication and authorization webhook used by the apiserver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a webhook returns a 5xx response that has Retry-After set, the client end (Kubernetes) does not pay attention to that.

Would it be OK to briefly mention in a comment that this implementation does not adjust behavior based on Retry-After?
(to be clear - it's OK not to check that header; maybe a future PR can start checking that response header)

@dims
Copy link
Member

dims commented Nov 2, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, dims, sjenning, sttts, tkashem

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2020
@k8s-ci-robot k8s-ci-robot merged commit cb0389c into kubernetes:master Nov 2, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 2, 2020
@tkashem tkashem deleted the webhook-retry branch November 2, 2020 14:37
sgreene570 added a commit to sgreene570/router that referenced this pull request Dec 11, 2020
kubernetes/kubernetes#95705 added the
requirement for specifying the `WebhookRetryBackoff` field in
authorizerfactory.DelegatingAuthorizerConfig{} struct used for metrics
authorization. This commit explicitly sets the field to the previous
implicitly used defaults, available in "k8s.io/apiserver/pkg/server/options".
This commit is purely for compatability with kubernetes apiserver 1.20 and
does not change behavior.
sgreene570 added a commit to sgreene570/router that referenced this pull request Dec 14, 2020
kubernetes/kubernetes#95705 added the
requirement for specifying the `WebhookRetryBackoff` field in
authorizerfactory.DelegatingAuthenticatorConfig{} struct used for metrics
authorization. This commit explicitly sets the field to the previous
implicitly used defaults, available in "k8s.io/apiserver/pkg/server/options".
This commit is purely for compatability with kubernetes apiserver 1.20 and
does not change behavior.
sgreene570 added a commit to sgreene570/router that referenced this pull request Dec 14, 2020
pkg/cmd/infra/router/template.go:

kubernetes/kubernetes#95705 added the
requirement for specifying the `WebhookRetryBackoff` field in
authentication/authorizer DelegatingAuthenticatorConfig{} struct used for metrics
authentication. This commit explicitly sets the field to the previous
implicitly used defaults, available in "k8s.io/apiserver/pkg/server/options".
This commit is purely for compatability with kubernetes apiserver 1.20 and
does not change behavior.
sgreene570 added a commit to sgreene570/router that referenced this pull request Dec 14, 2020
pkg/cmd/infra/router/template.go:

kubernetes/kubernetes#95705 added the
requirement for specifying the `WebhookRetryBackoff` field in
authentication/authorizer DelegatingAuthenticatorConfig{} struct used for metrics
authentication. This commit explicitly sets the field to the previous
implicitly used defaults, available in "k8s.io/apiserver/pkg/server/options".
This commit is purely for compatability with kubernetes apiserver 1.20 and
does not change behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/cloudprovider area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants