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

Watch Conditions, TriggerBindings, TriggerTemples #492

Closed
wants to merge 0 commits into from

Conversation

dacleyra
Copy link
Collaborator

@dacleyra dacleyra commented Feb 14, 2020

This should fix issue #483 and work towards fixing issue #491

For created assets (tasks/pipelines/triggers) set ownerReference controller=true.
In turn they are properly watched and recreated if modified/deleted.

Add Watch for Condititions

Add Watch for TriggerBindings, TriggerTemplates...

It turns out the TriggerBindings and TriggerTemplates can't really be watched unless Kabanero is a cluster operator. The objects are created in tekton-pipelines namespace, but the operator env WATCH_NAMESPACE is scoped only to kabanero. They don't get an ownerRef.

Should probably be picked for 0.6

@@ -288,7 +307,7 @@ func reconcileActiveVersions(stackResource *kabanerov1alpha2.Stack, c client.Cli
renderingContext["CollectionId"] = cID
renderingContext["StackId"] = cID

ownerIsController := false
ownerIsController := true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this falls apart when you have two stacks that use the same pipeline. The stack controller tries to add the second stack to the owners array, but the request fails because only one owner can have ownerIsController set. I thought it would be more consistent to have them all set to false here, rather than have the first Stack set it to true and the rest set it to false. There is really nothing special about the first stack.

- kind: Condition
name: ''
version: v1alpha1
- kind: TriggerBinding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trigger bindings and trigger templates don't follow the object ownership model (they are in a different namespace) so there will never be any of these objects in the openshift console. It's probably best to leave them off of the resources view (unless there's another reason why they are here, in which case please let me know what that is).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants