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

Added Amazon ECR Credential Helper #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yashsingh74
Copy link
Collaborator

This PR aims to add the amazon ECR credential helper.

@prowtce
Copy link
Contributor

prowtce bot commented Apr 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yashsingh74

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

@yashsingh74
Copy link
Collaborator Author

Please check and review.
I also need the following information <aws_account_id> and to be added in the run.sh file.

Q. Is it ok to add the AWS Account ID publicly open in the run.sh?

Copy link
Owner

@rajaskakodkar rajaskakodkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments otherwise lgtm. Also, lets try this locally before updating the job.

@@ -5,6 +5,19 @@ export registry_path="${2}"

source /usr/local/bin/dind.sh

# Configuring docker-credential-helper-ecr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add this inside the if [[ "${REGISTRY_ENABLED}" == "true" ]]; then block?

{
"credHelpers": {
"public.ecr.aws": "ecr-login",
"<aws_account_id>.dkr.ecr.<region>.amazonaws.com":"ecr-login"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the credHelpers. It is not needed for pull and push for docker images.

@rajaskakodkar
Copy link
Owner

Q. Is it ok to add the AWS Account ID publicly open in the run.sh?

I think it should be ok, however, I wonder if we will require it for public ECR.

@rajaskakodkar
Copy link
Owner

Lets merge this post infra migration.

/hold

@rajaskakodkar
Copy link
Owner

https://github.com/awslabs/amazon-ecr-credential-helper#troubleshooting mentions that logs can be captured in ~/.ecr/log. I think it'd be cool to push these logs as part of prow $ARTIFACTS. However, we need to verify that the logs are clean.

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

2 participants