Skip to content

fix: fix specifying namespace is not working#489

Merged
yipeng1030 merged 2 commits intomainfrom
bugfix/fix_kbcli_cluster_list-instances
Nov 18, 2024
Merged

fix: fix specifying namespace is not working#489
yipeng1030 merged 2 commits intomainfrom
bugfix/fix_kbcli_cluster_list-instances

Conversation

@yipeng1030
Copy link
Contributor

@yipeng1030 yipeng1030 commented Nov 18, 2024

fix apecloud/kubeblocks#8448

What' changed?

  • New a factory in buildCustomOpsCmds when trying to list resources by dynamic client.

Why?

  • The buildCustomOpsCmds() function uses a dynamic client built from the factory, which loads the kubeconfig and ignores the overriding flags like --namespace=. This results in a bug where specifying the namespace does not work as expected.

@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines. label Nov 18, 2024
@yipeng1030 yipeng1030 marked this pull request as ready for review November 18, 2024 09:13
@yipeng1030 yipeng1030 merged commit 9584c24 into main Nov 18, 2024
@yipeng1030 yipeng1030 deleted the bugfix/fix_kbcli_cluster_list-instances branch November 18, 2024 09:24
@github-actions github-actions bot added this to the Release 1.0 milestone Nov 18, 2024
@yipeng1030
Copy link
Contributor Author

/cherry-pick release-1.0

@github-actions
Copy link

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kbcli/actions/runs/11889447716

github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
Co-authored-by: yipeng1030 <yipeng1030@users.noreply.github.com>
(cherry picked from commit 9584c24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]1.0 kbcli cluster list-instances failed If the cluster is set to a non-default namespace

2 participants