-
Notifications
You must be signed in to change notification settings - Fork 78
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
Using and testing non-default AWS credentials #367
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ce22694
to
ebc6a40
Compare
4594e65
to
561b115
Compare
lblackstone
requested changes
Apr 13, 2020
lblackstone
requested changes
Apr 13, 2020
c9db5f3
to
0d00315
Compare
This needs to be updated since the replacement of `aws-iam-authenticator` for `aws eks get-token` in the kubeconfig exec-based auth changed the number of args.
This change moves away from setting and using the AWS environment variables in Travis: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, to using `aws configure` in the Travis install phase to setup all AWS creds. The existence of the standard AWS environment variables always takes precedence over alternative AWS auth methods, which does not allow the use of AWS named profiles if necessary.
3a5849e
to
2b23606
Compare
2b23606
to
133a416
Compare
Co-Authored-By: Levi Blackstone <levi@pulumi.com>
Add `providerCredentialOpts` to scope the cluster's kubeconfig to the AWS credentials used in certain auth scenarios. For example: - Creating and using a new AWS provider instance, or - Setting the AWS_PROFILE environment variable, or - Using a named profile configured on the AWS provider via: `pulumi config set aws:profile <profileName>` This fixes the use of profiles to properly create the k8s VPC CNI and aws-auth ConfigMap. See for more details: - https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/#Provider - https://www.pulumi.com/docs/intro/cloud-providers/aws/setup/ - https://www.pulumi.com/docs/intro/cloud-providers/aws/#configuration - https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html
133a416
to
988488c
Compare
Feedback has been addressed. PTAL @lblackstone |
lblackstone
reviewed
Apr 17, 2020
988488c
to
cff44f9
Compare
lblackstone
approved these changes
Apr 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
The following changes are related to using and testing alternative AWS credentials, instead of the default credential chain, to create EKS clusters.
CI:
Fixes CI smoke test bug
Updates CI AWS auth to use
aws configure
to allow the use of alternative named profiles.Note: TravisCI environment variables were also updated to work with
aws configure
.Cluster:
Pass an AWS provider to all AWS resources if one is set in the cluster resource options.
Note: Tested in CloudTrail for alternative profile use to
get
/create
all AWS resources.kubeconfig + non-default AWS creds:
providerCredentialOpts
to configure the cluster's kubeconfig auth when using a non-default AWS creds chain (e.g. such as using named profiles or AWS provider instance).Related issues (optional)
Fixes #368
Fixes #369
Closes #370
Fixes #296