You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70-3Lines changed: 70 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,24 +16,91 @@ From an operational perspective:
16
16
17
17
## Quick Start
18
18
19
+
You'll need a credentials that can assume a role with the following policy. Note, you can substitute `*` with the ARN of the repository if you want to limit the role to a specific repository. For multiple specific repos, use add more statement with different ARNs.
20
+
21
+
```json
22
+
{
23
+
"Version": "2012-10-17",
24
+
"Statement": [
25
+
{
26
+
"Effect": "Allow",
27
+
"Action": [
28
+
"ecr:GetAuthorizationToken",
29
+
"ecr:GetDownloadUrlForLayer",
30
+
"ecr:BatchGetImage",
31
+
"ecr:BatchCheckLayerAvailability"
32
+
],
33
+
"Resource": "*"
34
+
}
35
+
]
36
+
}
37
+
```
38
+
39
+
19
40
Setup your values.yaml for the helm chart. Specifically include the AWS credentials using the standard AWS SDK environment variables. The easiest way to issue long lived AWS credentials, the most secure way is to use [AWS OIDC](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html) with [Spiffe](https://spiffe.io/). The best reference for AWS SDK environment variables seems to be in the [AWS CLI documentation](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html).
20
41
21
-
```yaml
22
42
43
+
```yaml
23
44
pod:
24
45
container:
25
46
env:
47
+
# How you authenticate to AWS is up to you, see AWS CLI documentation for more options
26
48
- name: AWS_ACCESS_KEY_ID
27
49
value: "EXAMPLE"
28
50
- name: AWS_SECRET_ACCESS_KEY
29
51
value: "EXAMPLE"
52
+
53
+
# Recommended that you assume a role with the policy above
54
+
- name: AWS_ROLE_ARN
55
+
value: "ARN of role with ECR permissions"
56
+
57
+
# Important, this must match the region in the image name(s)
30
58
- name: AWS_REGION
31
-
#important, this must match the region in the image name
Once deployed, you can test it by creating a namespace with the label `ecr-anywhere.centml.ai/namespace: "enabled"`, then a secret of type `kubernetes.io/dockerconfigjson` with the label `ecr-anywhere.centml.ai/managed: "true"`. It doesn't matter what the secret contains, the mutating webhook will overwrite it with fresh ECR credentials.
0 commit comments