Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes getting a correct token for EKS clusters such that CLM can authenticate to an EKS cluster cross account.
This broke in #834 as the aws-iam-authenticator library was updated and the call was changed to not pass the existing session.
The problem was that when not passing the session, it falls back to setup a session from the current environment. When CLM is running centrally the current environment is an IAM role in the central account instead of an assumed role in the target account which has access to the targeted EKS cluster. The fix is to get a token in a way where we use the assumed role session to setup an STS client. Other API calls were removed from the upstream library in kubernetes-sigs/aws-iam-authenticator#750