clusterpedia icon indicating copy to clipboard operation
clusterpedia copied to clipboard

support apiserver url rewrite

Open huiwq1990 opened this issue 1 year ago • 5 comments

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 https://github.com/clusterpedia-io/clusterpedia/issues/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?:


huiwq1990 avatar Nov 13 '23 09:11 huiwq1990

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 avatar Nov 13 '23 09:11 clusterpedia-bot

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 avatar Nov 14 '23 08:11 Iceber

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.

huiwq1990 avatar Nov 16 '23 06:11 huiwq1990

@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 avatar Nov 22 '23 09:11 huiwq1990

LGTM

/cc @Iceber

wzshiming avatar Nov 24 '23 02:11 wzshiming