diff --git a/pkg/runner/kubectl/describe.go b/pkg/runner/kubectl/describe.go index 7f4d2af50..a87eead78 100644 --- a/pkg/runner/kubectl/describe.go +++ b/pkg/runner/kubectl/describe.go @@ -18,6 +18,7 @@ func Describe(collector *v1alpha1.Describe) (*v1alpha1.Command, error) { return nil, errors.New("name cannot be provided when a selector is specified") } cmd := v1alpha1.Command{ + Cluster: collector.Cluster, Entrypoint: "kubectl", Args: []string{"describe", collector.Resource}, } diff --git a/pkg/runner/kubectl/get.go b/pkg/runner/kubectl/get.go index bc475a3c7..02eaf000f 100644 --- a/pkg/runner/kubectl/get.go +++ b/pkg/runner/kubectl/get.go @@ -17,6 +17,7 @@ func Get(collector *v1alpha1.Get) (*v1alpha1.Command, error) { return nil, errors.New("name cannot be provided when a selector is specified") } cmd := v1alpha1.Command{ + Cluster: collector.Cluster, Entrypoint: "kubectl", Args: []string{"get", collector.Resource}, } diff --git a/pkg/runner/kubectl/pod_logs.go b/pkg/runner/kubectl/pod_logs.go index 0ed551970..b5b9f388d 100644 --- a/pkg/runner/kubectl/pod_logs.go +++ b/pkg/runner/kubectl/pod_logs.go @@ -18,6 +18,7 @@ func Logs(collector *v1alpha1.PodLogs) (*v1alpha1.Command, error) { return nil, errors.New("name cannot be provided when a selector is specified") } cmd := v1alpha1.Command{ + Cluster: collector.Cluster, Entrypoint: "kubectl", Args: []string{"logs", "--prefix"}, } diff --git a/pkg/runner/processors/step.go b/pkg/runner/processors/step.go index 0dbcd613f..0d7c6d7cf 100644 --- a/pkg/runner/processors/step.go +++ b/pkg/runner/processors/step.go @@ -213,6 +213,7 @@ func (p *stepProcessor) catchOperations(ctx context.Context, handlers ...v1alpha register(p.commandOperation(ctx, *cmd)) } else if handler.Events != nil { cmd, err := kubectl.Get(&v1alpha1.Get{ + Cluster: handler.Events.Cluster, Timeout: handler.Events.Timeout, Resource: "events", ObjectLabelsSelector: handler.Events.ObjectLabelsSelector, @@ -270,6 +271,7 @@ func (p *stepProcessor) finallyOperations(ctx context.Context, handlers ...v1alp register(p.commandOperation(ctx, *cmd)) } else if handler.Events != nil { cmd, err := kubectl.Get(&v1alpha1.Get{ + Cluster: handler.Events.Cluster, Timeout: handler.Events.Timeout, Resource: "events", ObjectLabelsSelector: handler.Events.ObjectLabelsSelector,