Skip to content

Commit

Permalink
Add ECR credentials file example for pro-builder
Browse files Browse the repository at this point in the history
Show a full example of the AWS credentials file to use the
pro-builder with ECR.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
welteki authored and alexellis committed Nov 16, 2023
1 parent 7e2314e commit e2cd2d7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions chart/pro-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,23 @@ kubectl create secret generic registry-secret \

> For more details on the configuration see: [amazon-ecr-credentials-helper](https://github.com/awslabs/amazon-ecr-credential-helper#docker)
Create a secret for the AWS credentials. The credentials must have a policy applied that allows access to Amazon ECR.
Create a secret for the AWS credentials file. The credentials must have a policy applied that allows access to Amazon ECR.

Create the credentials file:
```bash
export AWS_ACCESS_KEY_ID=""
export AWS_ACCESS_SECRET_KEY=""

cat > ecr-credentials.txt <<EOF
[default]
aws_access_key_id=$AWS_ACCESS_KEY_ID
aws_secret_access_key=$AWS_ACCESS_SECRET_KEY
EOF
```

```
kubectl create secret generic -n openfaas \
aws-ecr-credentials --from-file aws-ecr-credentials=$HOME/ecr-credentials.txt
aws-ecr-credentials --from-file aws-ecr-credentials=./ecr-credentials.txt
```

Modify your `values.yaml` file accordingly to mount the secret in the Pro Builder.
Expand Down

0 comments on commit e2cd2d7

Please sign in to comment.