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

support apiserver url rewrite #590

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huiwq1990
Copy link
Contributor

@huiwq1990 huiwq1990 commented Nov 13, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Expose the binding-apiserver more kubernete.

Which issue(s) this PR fixes:

Fixes #589

Special notes for your reviewer:

  1. Add command --feature-gates=ApiServerURLRewrite=true to open the feature.
  2. kubeconfig file's server: https://${binding-apiserver}:${binding-apiserver-port}/, example: https://10.0.0.4:30443/

Does this PR introduce a user-facing change?:


@clusterpedia-bot
Copy link

Hi @huiwq1990,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@clusterpedia-bot clusterpedia-bot added the kind/feature New feature label Nov 13, 2023
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from 66b6460 to b411cb5 Compare November 14, 2023 02:32
@Iceber
Copy link
Member

Iceber commented Nov 14, 2023

If /resources is still needed, I think it's not necessary to change it, and /apis/clusterpedia.io/v1beta1/resources is more standardized and easier to understand than /resources.

If you choose to remove the prefix, then clusterpedia-ip:port/apis/<group>/<resource> -> clusterpedia-ip:port/apis/clusterpedia.io/v1beta1/resources/apis/<group>/<resource>would be better.

@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from b411cb5 to c09bdce Compare November 16, 2023 06:30
@huiwq1990
Copy link
Contributor Author

If /resources is still needed, I think it's not necessary to change it, and /apis/clusterpedia.io/v1beta1/resources is more standardized and easier to understand than /resources.

If you choose to remove the prefix, then clusterpedia-ip:port/apis/<group>/<resource> -> clusterpedia-ip:port/apis/clusterpedia.io/v1beta1/resources/apis/<group>/<resource>would be better.

@Iceber I made some change, and remove /resources suffix.

@Iceber Iceber self-requested a review November 17, 2023 14:21
@Iceber Iceber self-assigned this Nov 17, 2023
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch 2 times, most recently from c25ffe2 to c8ff14b Compare November 22, 2023 09:46
@huiwq1990
Copy link
Contributor Author

@wzshiming The old version, I want to implement a general rewriter, it's too complex for us. So I did some refactor, it's easy to understand.

@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from c8ff14b to 305d1e9 Compare November 22, 2023 10:06
pkg/utils/filters/rewrite_test.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from 305d1e9 to 1ec220c Compare November 22, 2023 11:12
@wzshiming
Copy link
Member

LGTM

/cc @Iceber

Copy link
Member

@Iceber Iceber left a comment

Choose a reason for hiding this comment

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

There are some points for discussion

pkg/apiserver/features/features.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Outdated Show resolved Hide resolved
pkg/utils/filters/rewrite.go Show resolved Hide resolved
pkg/apiserver/features/features.go Outdated Show resolved Hide resolved
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from 1ec220c to b402e62 Compare November 28, 2023 11:23
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from b402e62 to 99f0dce Compare December 7, 2023 09:14
Signed-off-by: huiwq1990 <huiwq1990@163.com>
@huiwq1990 huiwq1990 force-pushed the feat-apiserver-rewrite branch from 99f0dce to 77f3455 Compare December 7, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose binding-apiserver directly to end uses
4 participants