Skip to content

Commit

Permalink
Fix bug with odo list --namespace while fetching binding information
Browse files Browse the repository at this point in the history
Signed-off-by: Parthvi Vala <pvala@redhat.com>
  • Loading branch information
valaparthvi committed May 26, 2023
1 parent dd1824b commit 33af81b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/odo/cli/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func (lo *ListOptions) Complete(ctx context.Context, cmdline cmdline.Cmdline, ar
} else if lo.clientset.KubernetesClient != nil {
lo.namespaceFilter = odocontext.GetNamespace(ctx)
}
// Set the namespace; this ensures we fetch resources from the given namespace
if lo.clientset.KubernetesClient != nil {
lo.clientset.KubernetesClient.SetNamespace(lo.namespaceFilter)
}

return nil
}
Expand Down

0 comments on commit 33af81b

Please sign in to comment.