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

fix: collectors cluster #925

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions pkg/runner/kubectl/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down
1 change: 1 addition & 0 deletions pkg/runner/kubectl/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down
1 change: 1 addition & 0 deletions pkg/runner/kubectl/pod_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/runner/processors/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading