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

Authing no longer works with multiple args passed in as a list #2322

Open
geoman3 opened this issue Jan 16, 2025 · 5 comments
Open

Authing no longer works with multiple args passed in as a list #2322

geoman3 opened this issue Jan 16, 2025 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@geoman3
Copy link

geoman3 commented Jan 16, 2025

Recent change to auth'ing with ExecProvider broke my ability to auth.

This is what my k8's config looks like:

...
- name: <cluster-name>
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - --region
      - <region>
      - eks
      - get-token
      - --cluster-name
      - <cluster-name>
      - --output
      - json
      - --role
      - <aws-role>
      command: aws
      env:
      - name: AWS_PROFILE
        value: <profile-name>
      interactiveMode: IfAvailable
      provideClusterInfo: false
...

I tested this with version 31 and 29

with version 31 I am seeing this being output in the terminal:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

aws: error: the following arguments are required: command

and then when I go to make a list pods call I get a 403 error as an unknown user

And on version 29 I do not see the above output and authentication works as desired.

I believe this is due to the following change: 2dfa782

which is causing all arguments following the first one to be dropped.

https://docs.python.org/3/library/subprocess.html#frequently-used-arguments

Let me know if you need any more information. I'm not too sure on the implications this would have for Windows users

  • OS: MacOS 14.4.1
  • Python version: 3.11.9

Thanks

@geoman3 geoman3 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 16, 2025
@matts-au
Copy link

I think PR #2289 broke it.

@obaranov
Copy link

Yeah, we hit the same issue while using the kubernetes.core Ansible collection. We had to revert back to the kubernetes==31.0.0.

@yliaog
Copy link
Contributor

yliaog commented Jan 29, 2025

#2338

does this PR fix the issue?

@jrwren
Copy link

jrwren commented Jan 31, 2025

I can confirm and reproduce this.

I can also confirm that going back to 31.0.0 works around it.

@yliaog
Copy link
Contributor

yliaog commented Jan 31, 2025

thanks, assigned the PR to you for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants