kops
kops copied to clipboard
allow ecr pull-through-cache
- Adds
ecr:BatchImportUpstreamImageto the nodes IAM. fixes #13456
Hi @karancode. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign olemarkus after the PR has been reviewed.
You can assign the PR to them by writing /assign @olemarkus in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Can you add some documentation on how to make use of this feature? I assume one also need to configure mirrors for containerd.
/ok-to-test
Hi @olemarkus thanks for the review.
Can you add some documentation on how to make use of this feature?
If anyone is using the aws ecr pull through cache then they need to create cache rules and for k8s(nodes) to be able to use those rules, they just need this additional iam policy. There is no other special config required. Using pull through cache, quay/amzn-ecr-public repos can be pulled directly just by using the ecr endpoint aws_account_id.dkr.ecr.region.amazonaws.com/quay/repository_name/image_name:tag
Let me know if I should add above to the readme?
I assume one also need to configure mirrors for containerd.
Sorry I am not sure about this. Let me check.
Hi @olemarkus thanks for the review.
Can you add some documentation on how to make use of this feature?
If anyone is using the aws ecr pull through cache then they need to create cache rules and for k8s(nodes) to be able to use those rules, they just need this additional iam policy. There is no other special config required. Using pull through cache, quay/amzn-ecr-public repos can be pulled directly just by using the ecr endpoint
aws_account_id.dkr.ecr.region.amazonaws.com/quay/repository_name/image_name:tagLet me know if I should add above to the readme?
So if I understand this correctly, this is only useful for your own images if you explicitly change the image name? You cannot use it as a normal containerd image? Where the Pod would have the original image specified, but containerd would try to pull it from the given endpoint?
@olemarkus sorry for late. So basically, it is just for pulling an external image and caching the image to our private ECR repo. I think it will be the same for docker/containerd. 🤔
/retest-required
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
@karancode: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-kops-bazel-test | 2c13ca3ff2da87c9dcc701cde28f38c0170a50a9 | link | true | /test pull-kops-bazel-test |
| pull-kops-e2e-cni-cilium-ipv6 | 2c13ca3ff2da87c9dcc701cde28f38c0170a50a9 | link | false | /test pull-kops-e2e-cni-cilium-ipv6 |
| pull-kops-e2e-cni-amazonvpc | 2c13ca3ff2da87c9dcc701cde28f38c0170a50a9 | link | true | /test pull-kops-e2e-cni-amazonvpc |
| pull-kops-e2e-aws-karpenter | 2c13ca3ff2da87c9dcc701cde28f38c0170a50a9 | link | true | /test pull-kops-e2e-aws-karpenter |
| pull-kops-test | 2c13ca3ff2da87c9dcc701cde28f38c0170a50a9 | link | true | /test pull-kops-test |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Reopen this PR with
/reopen - Mark this PR as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closedYou can:
- Reopen this PR with
/reopen- Mark this PR as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@olemarkus I suspect this should work with specifying aws_account_id.dkr.ecr.region.amazonaws.com/quay as a registry mirror for containerd.
I tried it for Docker Hub hosted image (aws_account_id.dkr.ecr.region.amazonaws.com/docker) and kubelet tried to pull images from the correct URL but I was getting a 401 error. I suspect the said IAM permission is needed on the nodes.
Update: I'll try to find some time and try this by attaching the needed IAM permission externally.