clusterpedia
clusterpedia copied to clipboard
support apiserver url rewrite
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:
- Add command
--feature-gates=ApiServerURLRewrite=trueto open the feature. - 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?:
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.
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.
If
/resourcesis still needed, I think it's not necessary to change it, and/apis/clusterpedia.io/v1beta1/resourcesis 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.
@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.
LGTM
/cc @Iceber