Skip to content

Commit

Permalink
use labelselector for more resources
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Jan 3, 2024
1 parent 2b5c3a4 commit 01c7c6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/controller/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func applySelectors(options cache.Options) cache.Options {
&appsv1.Deployment{}: managedByNATS,
&appsv1.StatefulSet{}: managedByNATS,
&corev1.ServiceAccount{}: managedByNATS,
&corev1.Secret{}: managedByNATS,
&corev1.Service{}: managedByNATS,
&corev1.ConfigMap{}: managedByNATS,
&rbacv1.ClusterRole{}: managedByNATS,
&rbacv1.ClusterRoleBinding{}: managedByNATS,
&autoscalingv1.HorizontalPodAutoscaler{}: managedByNATS,
Expand Down
6 changes: 6 additions & 0 deletions internal/controller/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func Test_applySelectors(t *testing.T) {
&appsv1.Deployment{}: selector,
&appsv1.StatefulSet{}: selector,
&corev1.ServiceAccount{}: selector,
&corev1.Secret{}: selector,
&corev1.Service{}: selector,
&corev1.ConfigMap{}: selector,
&rbacv1.ClusterRole{}: selector,
&rbacv1.ClusterRoleBinding{}: selector,
&autoscalingv1.HorizontalPodAutoscaler{}: selector,
Expand All @@ -67,6 +70,9 @@ func Test_applySelectors(t *testing.T) {
&appsv1.Deployment{}: selector,
&appsv1.StatefulSet{}: selector,
&corev1.ServiceAccount{}: selector,
&corev1.Secret{}: selector,
&corev1.Service{}: selector,
&corev1.ConfigMap{}: selector,
&rbacv1.ClusterRole{}: selector,
&rbacv1.ClusterRoleBinding{}: selector,
&autoscalingv1.HorizontalPodAutoscaler{}: selector,
Expand Down

0 comments on commit 01c7c6a

Please sign in to comment.