Skip to content

Commit

Permalink
removes autoscaler from cache watch
Browse files Browse the repository at this point in the history
it should remove errors if hpa not availible at cluster api
  • Loading branch information
f41gh7 committed Nov 30, 2021
1 parent 2c6f81e commit 04bab9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/manager/manager.go
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/prometheus-operator/prometheus-operator/pkg/client/versioned"
"github.com/spf13/pflag"
v12 "k8s.io/api/apps/v1"
"k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -88,7 +89,7 @@ func RunManager(ctx context.Context) error {
Port: 9443,
LeaderElection: *enableLeaderElection,
LeaderElectionID: "57410f0d.victoriametrics.com",
ClientDisableCacheFor: []client.Object{&v1.Secret{}, &v1.ConfigMap{}, &v1.Pod{}, &v12.Deployment{}, &v12.StatefulSet{}},
ClientDisableCacheFor: []client.Object{&v1.Secret{}, &v1.ConfigMap{}, &v1.Pod{}, &v12.Deployment{}, &v12.StatefulSet{}, &v2beta2.HorizontalPodAutoscaler{}},
Namespace: config.MustGetWatchNamespace(),
})
if err != nil {
Expand Down

0 comments on commit 04bab9c

Please sign in to comment.