From 911378cae6747d13c90195d712490685dfb4defb Mon Sep 17 00:00:00 2001 From: jackdelahunt Date: Tue, 5 Nov 2024 11:17:27 +0000 Subject: [PATCH] fix: added Service and ServiceMonitor to DSP controller Owns list --- .../datasciencepipelines/datasciencepipelines_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/components/datasciencepipelines/datasciencepipelines_controller.go b/controllers/components/datasciencepipelines/datasciencepipelines_controller.go index b3f5df40722..db7a50000ac 100644 --- a/controllers/components/datasciencepipelines/datasciencepipelines_controller.go +++ b/controllers/components/datasciencepipelines/datasciencepipelines_controller.go @@ -35,6 +35,7 @@ import ( "github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/reconciler" odhdeploy "github.com/opendatahub-io/opendatahub-operator/v2/pkg/deploy" "github.com/opendatahub-io/opendatahub-operator/v2/pkg/metadata/labels" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" ) var ( @@ -55,6 +56,8 @@ func NewComponentReconciler(ctx context.Context, mgr ctrl.Manager) error { Owns(&rbacv1.Role{}). Owns(&rbacv1.RoleBinding{}). Owns(&corev1.ServiceAccount{}). + Owns(&corev1.Service{}). + Owns(&monitoringv1.ServiceMonitor{}). Owns(&appsv1.Deployment{}, builder.WithPredicates(resources.NewDeploymentPredicate())). Owns(&securityv1.SecurityContextConstraints{}). Watches(&extv1.CustomResourceDefinition{}). // call ForLabel() + new predicates