Skip to content
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

ECR should take AWS_DEFAULT_REGION into account #1580

Merged
merged 3 commits into from Sep 5, 2018

Conversation

hekonsek
Copy link

@hekonsek hekonsek commented Sep 3, 2018

Hi,

Right now when you create new application on AWS EKS, jx reads only AWS_REGION environment variable. At the same time jx install --provider=eks respects AWS_DEFAULT_REGION. As a result if you have only AWS_DEFAULT_REGION=us-east-1 set on your machine, jx will create EKS cluster in us-east-1, but new repositories will be created in us-west-1 (which is current default). Also application build respects original AWS_DEFAULT_REGION, so eventually application build fail on Jenkins as it tries to push repository in wrong region (west instead of east).

According to AWS CLI documentation AWS_DEFAULT_REGION is the proper env to set to indicate AWS region. However it is also common for tools to use AWS_REGION.

I propose then that ecr#NewAwsSession should respect both AWS_DEFAULT_REGION and AWS_REGION. This simple fix solves the problem.

@jenkins-x-bot
Copy link
Contributor

Hi @hekonsek. Thanks for your PR.

I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jstrachan
Copy link
Member

/approvd

@jstrachan
Copy link
Member

/approve
might type it correctly this time ;)

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jstrachan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jstrachan
Copy link
Member

/approved

@jstrachan jstrachan merged commit bbb21ac into jenkins-x:master Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants