Skip to content

Added Amazon ECR Credential Helper#61

Open
yashsingh74 wants to merge 2 commits intorajaskakodkar:mainfrom
yashsingh74:yash-patch-2
Open

Added Amazon ECR Credential Helper#61
yashsingh74 wants to merge 2 commits intorajaskakodkar:mainfrom
yashsingh74:yash-patch-2

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

Details 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.


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.

2 participants