-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Allow to set api_version for kube_exec_auth #123
Conversation
Latest AWS CLI switched API version from 'client.authentication.k8s.io/v1alpha1' to 'client.authentication.k8s.io/v1beta1'. As there is no easy way to autodetect this version, provide variable that allows to set API version to expected value. Maintain backwards compatibility by using older API version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@z0rc Thank you for this PR. When I say "this is awful" I do not mean your work, I mean this situation.
I want to do a lot more investigation before I accept that there is no way to automatically configure the correct version or force the aws
CLI to return a consistent version.
I think I would rather run aws --version
and parse the results if necessary, because it is going to be too hard for users to configure this across environments.
@Nuru your proposed approach has it's own set of challenges and resulting code will be a pain to maintain. Here are some of them:
I honestly tried to code some of those challenges, but it doesn't look pretty or even solvable at this moment. The potential amount of esoteric terraform code to just set single string is horrifying me. I'm happy if you find a way to solve this, but personally I already found a solution that satisfies me, this PR. |
You might try:
bash
tf
I did not test, but copied from the other internal working example which does similar thing for AWS MSK |
@max-lobur Proposed approach introduces bash and jq dependencies, which doesn't sit well with me for running terraform. I'd probably migrate away from this module, if something like this is implemented. |
best example I have ¯_(ツ)_/¯ |
@z0rc I would recommend that rather than migrate away from this module because We are not committed to supporting |
@Nuru Well, thing is Anyway, there is aws/aws-cli#6308 now. The breaking change is reverted and this PR isn't needed anymore. Something like this might be needed in future, depending how api version handling develops on aws-cli side. I'll wait a couple of days to see how story develops here and on aws-cli side. But most likely this PR will be closed without merge. |
No longer needed (See #122) |
what
Allow to set api_version for kube_exec_auth. Maintain backwards compatibility by using older API version.
why
Latest AWS CLI switched API version from
client.authentication.k8s.io/v1alpha1
toclient.authentication.k8s.io/v1beta1
. As there is no easy way to autodetect this version, provide variable that allows to set API version to expected value.references
client.authentication.k8s.io/v1beta1
api version #122