Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added namespace to create obj #385

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Changes from 1 commit
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
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