Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticated registry mirror support for image pulls #3060

Open
4 tasks
saschagrunert opened this issue Nov 29, 2021 · 17 comments
Open
4 tasks

Authenticated registry mirror support for image pulls #3060

saschagrunert opened this issue Nov 29, 2021 · 17 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@saschagrunert
Copy link
Member

saschagrunert commented Nov 29, 2021

Enhancement Description

  • One-line enhancement description (can be used as a release note): Added authenticated registry mirror support for image pulls
  • Kubernetes Enhancement Proposal: TBD
  • Discussion Link: TBD
  • Primary contact (assignee): @saschagrunert
  • Responsible SIGs: SIG Node
  • Enhancement target (which target equals to which milestone):
    • Alpha release target (x.y): v1.31
    • Beta release target (x.y): TBD
    • Stable release target (x.y): TBD
  • Alpha

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

Summary

Right now we only filter for one matching credential secret during an image pull within the kubelet: https://github.com/kubernetes/kubernetes/blob/c98b388a847f84019609f6422b4ab00b89c4603c/pkg/kubelet/kuberuntime/kuberuntime_image.go#L38-L56

The kubelet does not know anything about the registry configuration on a node. Therefore, we should just pass all authentication credentials to the lower level container runtime to decide which one to choose for pulling the image. This requires a CRI change to be able to pass multiple credentials: https://github.com/kubernetes/kubernetes/blob/c98b388a847f84019609f6422b4ab00b89c4603c/pkg/kubelet/kuberuntime/kuberuntime_image.go#L38-L56

cc @mrunalp @haircommander @rphillips

@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Nov 29, 2021
@saschagrunert
Copy link
Member Author

/sig node

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 29, 2021
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 27, 2022
@saschagrunert saschagrunert removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 28, 2022
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 29, 2022
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 28, 2022
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or 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-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or 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.

@saschagrunert saschagrunert reopened this Oct 20, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
@saschagrunert saschagrunert reopened this Jun 27, 2023
@saschagrunert saschagrunert added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jun 27, 2023
@SergeyKanzhelev
Copy link
Member

@saschagrunert what do you think of teaching kubelet about mirrors and make the runtime just pull what's asked? It will require to pass the original image name as a "formal" image name.

@saschagrunert
Copy link
Member Author

@saschagrunert what do you think of teaching kubelet about mirrors and make the runtime just pull what's asked? It will require to pass the original image name as a "formal" image name.

Registry mirror implementations vary between runtime implementations. We could add a CRI call to resolve all available mirrors per image pull request. The result can be used to lookup the credentials.

@saschagrunert
Copy link
Member Author

@kubernetes/sig-node-feature-requests can we consider this one for 1.31? If so, then I'm happy to outline the KEP.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 12, 2024
@mrunalp
Copy link
Contributor

mrunalp commented Feb 14, 2024

@saschagrunert 👍

@SergeyKanzhelev
Copy link
Member

so the idea is to pass all credentials rather than move the mirror logic up to the kubelet? Will the KEP also include authentication of layers pulling when layers are in different registry (see GHSA-742w-89gc-8m9c).

@saschagrunert
Copy link
Member Author

so the idea is to pass all credentials rather than move the mirror logic up to the kubelet?

Yes

Will the KEP also include authentication of layers pulling when layers are in different registry (see GHSA-742w-89gc-8m9c).

I assume this should be handled by the runtime, which then has all available credentials at hand.

@saschagrunert saschagrunert changed the title Enable authenticated registry mirror support for image pulls Authenticated registry mirror support for image pulls Feb 20, 2024
@haircommander
Copy link
Contributor

@saschagrunert do you hope to make progress on this in 1.32?

@saschagrunert
Copy link
Member Author

@saschagrunert do you hope to make progress on this in 1.32?

Hm, I would not say it's a high priority but we can give it a try.

@SergeyKanzhelev
Copy link
Member

@saschagrunert do you hope to make progress on this in 1.32?

Hm, I would not say it's a high priority but we can give it a try.

As it's designed in the associated PR, it will require passing too much context all the time. Also may want to start passing the wildecards for the domain names, at which stage it is easier to ask user to configure the credential provider for the runtime.

Is there an appetite to move mirror config to the kubelet? It will require new CRI APIs which will allow to specify the "display name" for the image. But overall it will be much cleaner design I think

@haircommander haircommander moved this from Draft Stage to Not for release in SIG Node 1.32 KEPs planning Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
Status: Not for release
Development

No branches or pull requests

6 participants