diff --git a/internal/controller/cache/cache.go b/internal/controller/cache/cache.go index f54847aa..f857c81d 100644 --- a/internal/controller/cache/cache.go +++ b/internal/controller/cache/cache.go @@ -2,6 +2,7 @@ package cache import ( appsv1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" corev1 "k8s.io/api/core/v1" policyv1 "k8s.io/api/policy/v1" rbacv1 "k8s.io/api/rbac/v1" @@ -24,12 +25,13 @@ func applySelectors(options cache.Options) cache.Options { // Apply the label selector to all relevant objects. options.ByObject = map[client.Object]cache.ByObject{ - &appsv1.Deployment{}: managedByNATS, - &appsv1.StatefulSet{}: managedByNATS, - &corev1.ServiceAccount{}: managedByNATS, - &rbacv1.ClusterRole{}: managedByNATS, - &rbacv1.ClusterRoleBinding{}: managedByNATS, - &policyv1.PodDisruptionBudget{}: managedByNATS, + &appsv1.Deployment{}: managedByNATS, + &appsv1.StatefulSet{}: managedByNATS, + &corev1.ServiceAccount{}: managedByNATS, + &rbacv1.ClusterRole{}: managedByNATS, + &rbacv1.ClusterRoleBinding{}: managedByNATS, + &autoscalingv1.HorizontalPodAutoscaler{}: managedByNATS, + &policyv1.PodDisruptionBudget{}: managedByNATS, } return options }