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

Add an option for aggregator #112193

Merged
merged 2 commits into from Sep 9, 2022
Merged

Conversation

jindijamie
Copy link
Contributor

@jindijamie jindijamie commented Sep 1, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

Add an option for aggregator to deny certain requests

kube-apiserver: redirect responses are no longer returned from backends by default. Set `--aggregator-reject-forwarding-redirect=false` to continue forwarding redirect responses.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/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. labels Sep 1, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @jindijamie. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 1, 2022
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 1, 2022
@jindijamie
Copy link
Contributor Author

/cc enj

@liggitt
Copy link
Member

liggitt commented Sep 1, 2022

/cc @enj
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2022
@liggitt liggitt requested review from liggitt and removed request for logicalhan and smarterclayton September 1, 2022 23:04
@enj
Copy link
Member

enj commented Sep 1, 2022

@jindijamie can you add an integration test? See TestAggregatedAPIServer for the setup.

@jindijamie
Copy link
Contributor Author

@jindijamie can you add an integration test? See TestAggregatedAPIServer for the setup.

I will try to add that, but it might take some time as I'm not very familiar with those.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 6, 2022
@liggitt
Copy link
Member

liggitt commented Sep 6, 2022

/cc @deads2k
for visibility

/approve
change lgtm
/hold
will defer to @enj on integration test review

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 6, 2022
@jindijamie
Copy link
Contributor Author

@jindijamie can you add an integration test? See TestAggregatedAPIServer for the setup.

Add a test to ensure redirect responses are not forwarded

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

thanks for adding the test, one small suggestion, and would like @enj to review it as well

test/integration/examples/apiserver_test.go Show resolved Hide resolved
@liggitt
Copy link
Member

liggitt commented Sep 8, 2022

test lgtm, go ahead and squash into two commits, one with the change and one with the integration test

@enj
Copy link
Member

enj commented Sep 8, 2022

test lgtm, go ahead and squash into two commits, one with the change and one with the integration test

LGTM once this comment is addressed.

Add integration test to ensure aggregator is not forwarding redirect response
@enj
Copy link
Member

enj commented Sep 8, 2022

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 8, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, jindijamie, liggitt

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

@jindijamie
Copy link
Contributor Author

/retest

@jindijamie
Copy link
Contributor Author

/retest-required

@k8s-ci-robot k8s-ci-robot merged commit a793665 into kubernetes:master Sep 9, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Sep 9, 2022
k8s-ci-robot added a commit that referenced this pull request Sep 9, 2022
…upstream-release-1.23

Automated cherry pick of #112193: Add an option for aggregator
k8s-ci-robot added a commit that referenced this pull request Sep 9, 2022
…upstream-release-1.22

Automated cherry pick of #112193: Add an option for aggregator
k8s-ci-robot added a commit that referenced this pull request Sep 9, 2022
…upstream-release-1.25

Automated cherry pick of #112193: Add an option for aggregator
k8s-ci-robot added a commit that referenced this pull request Sep 9, 2022
…upstream-release-1.24

Automated cherry pick of #112193: Add an option for aggregator
@brandond
Copy link

brandond commented Sep 17, 2022

This PR incorrectly returns errors when the backend returns a 304 Not Modified response, ie in response to refreshes of the OpenAPI spec. I'll open an issue.

@sftim
Copy link
Contributor

sftim commented Sep 27, 2022

If the backend returns a 201 response with a Location: header, what should happen? Maybe it'd be useful to add a test to ensure that it actually does.

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/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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. 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

7 participants