codeflare-sdk
codeflare-sdk copied to clipboard
fix get_current_namespace
Issue link
closes #289
What changes have been made
Sometimes when the user has an api_client, they don't always want to search the serviceaccount. So this PR changes the get_current_namespace so that it always checks both the serviceaccount and kubeconfig for current namespace
Verification steps
Try logging out of cluster with oc logout and logging in through TokenAuthentication. Calling get_current_namespace should yield the correct result. With the old get_current_namespace it would print that namespace is not available
Checks
- [x] I've made sure the tests are passing.
- Testing Strategy
- [x] Unit tests
- [x] Manual tests
- [ ] Testing is not required for this change
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign maxusmusti for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment