Skip to content

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

Open
@geoman3

Description

@geoman3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions