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.

@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
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.

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
@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
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