diff --git a/pkg/cmd/cli/cmd/set/triggers.go b/pkg/cmd/cli/cmd/set/triggers.go index 487425c3472b..96c109cb9529 100644 --- a/pkg/cmd/cli/cmd/set/triggers.go +++ b/pkg/cmd/cli/cmd/set/triggers.go @@ -623,7 +623,11 @@ func triggerMatchesBuildImageChange(trigger ImageChangeTrigger, strategyTrigger if imageChange.From == nil { return strategyTrigger != nil && strategyTrigger.From == trigger.From && strategyTrigger.Namespace == trigger.Namespace } - return strategyTrigger.From == trigger.From && strategyTrigger.Namespace == trigger.Namespace + namespace := imageChange.From.Namespace + if strategyTrigger != nil { + namespace = defaultNamespace(namespace, strategyTrigger.Namespace) + } + return imageChange.From.Name == trigger.From && namespace == trigger.Namespace } func filterBuildImageTriggers(src []buildapi.BuildTriggerPolicy, trigger ImageChangeTrigger, strategyTrigger *ImageChangeTrigger) []buildapi.BuildTriggerPolicy {