Skip to content

Commit b94bf1b

Browse files
tompizmorchrissgyulev
authored andcommitted
docs: document how to use charts-syncer with Amazon Elastic Container Registry (ECR) repositories (#171)
1 parent a3c985f commit b94bf1b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,32 @@ charts:
255255
- ...
256256
~~~
257257

258+
#### Amazon Elastic Container Registry (ECR)
259+
Amazon Elastic Container Registry (ECR) is an OCI registry, but it has two peculiarities that should be taken into account when interacting with charts-syncer.
260+
261+
The first peculiarity relates to authentication, usually you would have an IAM user with access_key_id and secret_access_key credentials. These **are not** the credentials that should be entered in the config file.
262+
To obtain the proper credentials, you need to obtain a temporary password to operate the ECR registry. By using the following command, you can get the password:
263+
264+
```
265+
$ aws ecr get-login-password --region REGION
266+
```
267+
268+
In the previous command remember to update the REGION placeholder by a proper value.
269+
The username will always be `AWS`.
270+
271+
The second peculiarity only affects when using ECR as a target registry since you need to create the repositories in advance.
272+
If the repositories don't exist when executing charts-syncer you will get an error like the following:
273+
274+
```
275+
failed to do request: Post "https://AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com/v2/charts-syncer-test/charts/common/blobs/uploads/": EOF
276+
failed to do request: Post "https://AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com/v2/charts-syncer-test/charts/apache/blobs/uploads/": EOF
277+
failed to do request: Post "https://AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com/v2/charts-syncer-test/charts/mariadb/blobs/uploads/": EOF
278+
failed to do request: Post "https://AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com/v2/charts-syncer-test/charts/mysql/blobs/uploads/": EOF
279+
failed to do request: Post "https://AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com/v2/charts-syncer-test/charts/redis/blobs/uploads/": EOF
280+
```
281+
282+
In that case make sure all the missing repositories are created before executing charts-syner again. Please refer to [AWS documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-create.html) to see how to do it.
283+
258284
### LOCAL example
259285

260286
In case charts-syncer is not able to directly push the modified charts to the desired target, it would be possible to sync the charts

0 commit comments

Comments
 (0)