Skip to content

Commit

Permalink
added namespace to create obj (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
smolaon authored and VaibhavPage committed Oct 21, 2019
1 parent 70cca52 commit f9fa18b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sensors/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package sensors
import (
"encoding/json"
"fmt"

"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/Knetic/govaluate"
Expand Down Expand Up @@ -327,7 +328,7 @@ func (sec *sensorExecutionCtx) createResourceObject(trigger *v1alpha1.Trigger, o
Resource: trigger.Template.Resource,
})

liveObj, err := dynamicResInterface.Create(obj, metav1.CreateOptions{})
liveObj, err := dynamicResInterface.Namespace(obj.GetNamespace()).Create(obj, metav1.CreateOptions{})
if err != nil {
return fmt.Errorf("failed to create resource object. err: %+v", err)
}
Expand Down

0 comments on commit f9fa18b

Please sign in to comment.