codeflare-sdk icon indicating copy to clipboard operation
codeflare-sdk copied to clipboard

fix get_current_namespace

Open carsonmh opened this issue 2 years ago • 1 comments

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

carsonmh avatar Aug 11 '23 21:08 carsonmh

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Aug 11 '23 21:08 openshift-ci[bot]