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

add autoscaling kind #18

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Changes from all 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
add autoscaling kind
  • Loading branch information
anoopwebs committed Jun 5, 2019
commit 86fb4b39d6f2642111f230b8e0db525fb484d981
5 changes: 5 additions & 0 deletions pkg/kube_events_manager/kube_events_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
appsV1 "k8s.io/client-go/informers/apps/v1"
autoscalingV2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1"
batchV1 "k8s.io/client-go/informers/batch/v1"
batchV2Alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
coreV1 "k8s.io/client-go/informers/core/v1"
Expand Down Expand Up @@ -235,6 +236,10 @@ func (em *MainKubeEventsManager) addKubeEventsInformer(kind, namespace string, l
sharedInformer = coreV1.NewFilteredServiceAccountInformer(kube.Kubernetes, namespace, resyncPeriod, indexers, tweakListOptions)
resourceList, err = kube.Kubernetes.CoreV1().ServiceAccounts(namespace).List(listOptions)

case "autoscaling":
sharedInformer = autoscalingV2beta1.NewFilteredHorizontalPodAutoscalerInformer(kube.Kubernetes, namespace, resyncPeriod, indexers, tweakListOptions)
resourceList, err = kube.Kubernetes.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(listOptions)

default:
return nil, fmt.Errorf("kind '%s' isn't supported", kind)
}
Expand Down