Closed chazsconi closed 5 years ago
Hey @chazsconi. This sounds like a useful feature to have, and I could probably throw it together pretty easily. How does swagger.json
work when you've got something like metrics-server installed? Does k8s give you an updated swagger.json with all it's endpoints and any extra stuff you've got installed, or did you have to glue together something youreself?
@obmarg When you have metrics server installed, the endpoint /swagger.json will give you the updated file - no need to glue it together manually.
@chazsconi I've put together a PR with this functionality in #57 if you want to take a look/try it out.
@obmarg Works well - thanks a lot! I added a comment in the PR.
We need to support the K8S metrics-server API (https://github.com/kubernetes-incubator/metrics-server) in our implementation.
To do this I need to fork the Kazan repo to make the following changes:
swagger.json
which included the metrics-server endpointsKazan.Codegen.Naming
to map the metrics namespace(https://github.com/chazsconi/kazan/commit/cd923bcab39a0a593b628ddb7d06fc87d694c6e9#diff-1856cab08f35cbaee3b304822e1699c4)
It would be nice if these two things could be set via the configuration.
Additionally I also had to manually change the
swagger.json
so thewindow
field is a string rather than aDuration
cause a crash when decoding, but this is really a different issue, and I'm not sure how to fix it properly.https://github.com/chazsconi/kazan/commit/0e44c4ec6ca5f691443bad766f83c9147f9d2812