fix: update eks in-cluster authentication to use web identify files #372
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.
Description
The previous #288 installation doesn't seem to work because there's no
secret
specified in thecredentials.NewStaticCredentialsProvider
call. I don't fully understand the reasons why this was changed because the envvarAWS_WEB_IDENTITY_TOKEN_FILE
is one of the documented ways of authenticating - https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentialsThis meant that the
/regions/aws
call always returns the errorfailed to refresh cached credentials, static credentials are empty
.@jarededwards I'd like to know if there is something I've misinterpreted in here. I also can't find any other use of the
aws.NewEKSServiceAccountClientV1()
call in the API, so I think it's safe to use.Related Issue(s)
Fixes #
How to test
gitops
repo, go to/registry/clusters/<cluster-name>/components/kubefirst/console.yaml
spec.helm.values
, update yourkubefirst-api
to include theimage.api.repository
andimage.api.tag
belowNB. I've built the
kubefirst-api
locally and pushed to ttl.sh. This will expire at some point on 2024-07-23 (approx 09:00 UTC) so you may need to rebuild. Do that by running:You can then update the
image.api.repository
value in theconsole.yaml