Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

fix watch & watch conditions #501

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/controller/stack/stack_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
}

Expand Down Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ spec:
- kind: Task
name: ''
version: v1alpha1
- kind: Condition
name: ''
version: v1alpha1
- kind: ServiceAccount
name: ''
version: v1
Expand Down