gitkube icon indicating copy to clipboard operation
gitkube copied to clipboard

Integrate with ECR

Open tirumaraiselvan opened this issue 6 years ago • 7 comments

ECR currently does not automatically create repositories on push unlike docker hub. How (where) should we handle this logic ?

tirumaraiselvan avatar May 24 '18 02:05 tirumaraiselvan

One way is to ask (infer) the repo in remote CR and create tags instead of creating repositories i.e.

tirumarai/test:247ff5 (dockerhub) becomes

tirumarai:test-247ff5 (ecr)

tirumaraiselvan avatar May 24 '18 02:05 tirumaraiselvan

How easy is it to create the registry? Provided the cluster has required IAM to do so?

shahidhk avatar May 25 '18 06:05 shahidhk

I don't know enough about this problem, but for now we should just have documentation that can be a manual step. I think all these problems will go away in the months to come anyway. So we should definitely not try to solve it from inside gitkube or the gitkube CLI.

-- Tanmai

On Thu, May 24, 2018 at 11:36 PM Shahidh K Muhammed < [email protected]> wrote:

How easy is it to create the registry? Provided the cluster has required IAM to do so?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hasura/gitkube/issues/68#issuecomment-391956423, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIAWCOy0_Up8USd4R8eh6Ng02Ke3BRzks5t16ZpgaJpZM4ULe7j .

coco98 avatar May 25 '18 06:05 coco98

It is either an HTTP call or aws cli. Either way it breaks the current pattern and proves an exception (till now). If we come up with some other registry which also has the same problem then we need to think about solving the problem more generally. I guess for the time being we can make it a manual step.

tirumaraiselvan avatar May 25 '18 06:05 tirumaraiselvan

Also the authentication to the AWS container registry lasts only for 12 hours. You have to keep renewing the docker credentials. Something like this cronjob will have to be run to keep the imagePullSecret renewed.

nizar-m avatar May 25 '18 07:05 nizar-m

@nizar-m Yes, but that is clearly out of the scope of gitkube.

tirumaraiselvan avatar May 25 '18 07:05 tirumaraiselvan

Docker push will fail if you use the command 'aws ecr get-login' to create the dockerPullSecrets and you end up doing it after 12 hours.

nizar-m avatar May 25 '18 08:05 nizar-m