From cdb82e1f655a20e5728764a6a140fe4e0df2c50a Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Thu, 12 Dec 2024 12:28:12 -0500 Subject: [PATCH] Stop watching Jobs --- controllers/ansibletest_controller.go | 3 +-- controllers/horizontest_controller.go | 3 +-- controllers/tobiko_controller.go | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/controllers/ansibletest_controller.go b/controllers/ansibletest_controller.go index 6e6b7b1..45d2144 100644 --- a/controllers/ansibletest_controller.go +++ b/controllers/ansibletest_controller.go @@ -32,7 +32,6 @@ import ( testv1beta1 "github.com/openstack-k8s-operators/test-operator/api/v1beta1" v1beta1 "github.com/openstack-k8s-operators/test-operator/api/v1beta1" "github.com/openstack-k8s-operators/test-operator/pkg/ansibletest" - batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" k8s_errors "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" @@ -281,7 +280,7 @@ func (r *AnsibleTestReconciler) SetupWithManager(mgr ctrl.Manager) error { CacheSyncTimeout: r.CacheSyncTimeout, }). For(&testv1beta1.AnsibleTest{}). - Owns(&batchv1.Job{}). + Owns(&corev1.Pod{}). Owns(&corev1.Secret{}). Owns(&corev1.ConfigMap{}). Complete(r) diff --git a/controllers/horizontest_controller.go b/controllers/horizontest_controller.go index a0dd7cf..9836cef 100644 --- a/controllers/horizontest_controller.go +++ b/controllers/horizontest_controller.go @@ -28,7 +28,6 @@ import ( "github.com/openstack-k8s-operators/lib-common/modules/common/helper" testv1beta1 "github.com/openstack-k8s-operators/test-operator/api/v1beta1" "github.com/openstack-k8s-operators/test-operator/pkg/horizontest" - batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" k8s_errors "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" @@ -267,7 +266,7 @@ func (r *HorizonTestReconciler) SetupWithManager(mgr ctrl.Manager) error { CacheSyncTimeout: r.CacheSyncTimeout, }). For(&testv1beta1.HorizonTest{}). - Owns(&batchv1.Job{}). + Owns(&corev1.Pod{}). Owns(&corev1.Secret{}). Owns(&corev1.ConfigMap{}). Complete(r) diff --git a/controllers/tobiko_controller.go b/controllers/tobiko_controller.go index 329390a..3dcb58d 100644 --- a/controllers/tobiko_controller.go +++ b/controllers/tobiko_controller.go @@ -34,7 +34,6 @@ import ( "github.com/openstack-k8s-operators/lib-common/modules/common/util" testv1beta1 "github.com/openstack-k8s-operators/test-operator/api/v1beta1" "github.com/openstack-k8s-operators/test-operator/pkg/tobiko" - batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" k8s_errors "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" @@ -358,7 +357,7 @@ func (r *TobikoReconciler) SetupWithManager(mgr ctrl.Manager) error { CacheSyncTimeout: r.CacheSyncTimeout, }). For(&testv1beta1.Tobiko{}). - Owns(&batchv1.Job{}). + Owns(&corev1.Pod{}). Owns(&corev1.Secret{}). Owns(&corev1.ConfigMap{}). Complete(r)