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

fix: change the expectedType of the kube-client reflector to match the listWatch #720

Merged
merged 3 commits into from
Apr 18, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions internal/collector/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import (
"k8s.io/klog"

"golang.org/x/net/context"
apps "k8s.io/api/apps/v1beta1"
appsv1 "k8s.io/api/apps/v1"
appsv1beta1 "k8s.io/api/apps/v1beta1"
autoscaling "k8s.io/api/autoscaling/v2beta1"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
Expand Down Expand Up @@ -192,7 +193,7 @@ func (b *Builder) buildDeploymentCollector() *coll.Collector {
familyHeaders,
composedMetricGenFuncs,
)
reflectorPerNamespace(b.ctx, b.kubeClient, &extensions.Deployment{}, store, b.namespaces, createDeploymentListWatch)
reflectorPerNamespace(b.ctx, b.kubeClient, &appsv1.Deployment{}, store, b.namespaces, createDeploymentListWatch)

return coll.NewCollector(store)
}
Expand Down Expand Up @@ -432,7 +433,7 @@ func (b *Builder) buildStatefulSetCollector() *coll.Collector {
familyHeaders,
composedMetricGenFuncs,
)
reflectorPerNamespace(b.ctx, b.kubeClient, &apps.StatefulSet{}, store, b.namespaces, createStatefulSetListWatch)
reflectorPerNamespace(b.ctx, b.kubeClient, &appsv1beta1.StatefulSet{}, store, b.namespaces, createStatefulSetListWatch)

return coll.NewCollector(store)
}
Expand Down