fix: incorrect type used for openapi spec

Prior to this fix, openapi spec for prometheus-adapter apiextension was based on the type "k8s.io/sample-apiserver/pkg/apiserver" which is incorrect. Due to the incorrect type, `kubectl explain podmetrics` (or nodemetrics) wasn't showing any doc for any resources from metrics.k8s.io/v1beta1.

This changeset fixes the problem by using the right type(sigs.k8s.io/metrics-server/pkg/api) for the openapi generation.

This also helped to remove the sample-apiserver dependency from
prometheus-adapter.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
This commit is contained in:
Arunprasad Rajkumar 2021-07-15 18:12:25 +05:30
parent 93450fc29f
commit aed49ff54f
No known key found for this signature in database
GPG key ID: 7DB93046D4687C2C
3 changed files with 1 additions and 6 deletions

1
go.mod
View file

@ -20,6 +20,5 @@ require (
k8s.io/klog/v2 v2.8.0
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7
k8s.io/metrics v0.21.1
k8s.io/sample-apiserver v0.21.1
sigs.k8s.io/metrics-server v0.5.0
)