From ee13cb56b88a6d050aebd130be253fbf345f5f6e Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Tue, 18 Feb 2020 16:20:19 -0500 Subject: [PATCH] fix watch & watch conditions --- pkg/controller/stack/stack_controller.go | 8 +++++++- .../kabanero-operator.v0.6.0.clusterserviceversion.yaml | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/controller/stack/stack_controller.go b/pkg/controller/stack/stack_controller.go index efb7e581..4120df41 100644 --- a/pkg/controller/stack/stack_controller.go +++ b/pkg/controller/stack/stack_controller.go @@ -81,7 +81,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { // Create a handler for handling Tekton Pipeline & Task events tH := &handler.EnqueueRequestForOwner{ - IsController: true, + IsController: false, OwnerType: &kabanerov1alpha2.Stack{}, } @@ -115,6 +115,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } + err = c.Watch(&source.Kind{Type: &pipelinev1alpha1.Condition{}}, tH, tPred) + if err != nil { + log.Info(fmt.Sprintf("Tekton Pipelines may not be installed")) + return err + } + return nil } diff --git a/registry/manifests/kabanero-operator/0.6.0/kabanero-operator.v0.6.0.clusterserviceversion.yaml b/registry/manifests/kabanero-operator/0.6.0/kabanero-operator.v0.6.0.clusterserviceversion.yaml index 4a1e62f7..1c956b09 100644 --- a/registry/manifests/kabanero-operator/0.6.0/kabanero-operator.v0.6.0.clusterserviceversion.yaml +++ b/registry/manifests/kabanero-operator/0.6.0/kabanero-operator.v0.6.0.clusterserviceversion.yaml @@ -178,6 +178,9 @@ spec: - kind: Task name: '' version: v1alpha1 + - kind: Condition + name: '' + version: v1alpha1 - kind: ServiceAccount name: '' version: v1