Skip to content

Support for ImageTagMirrorSet via ImageContentSource in HostedCluster #5608

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

Open
stianfro opened this issue Feb 12, 2025 · 1 comment
Open
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@stianfro
Copy link

It is currently possible to create a HostedCluster and specify imageContentSources like this:

spec:
  imageContentSources:
    - mirrors:
        - 'mirror.example.com'
      source: docker.io

Which results in a ImageDigestMirrorSet inside the cluster:

apiVersion: config.openshift.io/v1
kind: ImageDigestMirrorSet
metadata:
  labels:
    hypershift.openshift.io/managed: 'true'
    machineconfiguration.openshift.io/role: worker
  name: cluster
spec:
  imageDigestMirrors:
    - mirrors:
        - 'mirror.example.com'
      source: docker.io

This again configures /etc/containers/registries.conf on the nodes in the cluster:

unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
short-name-mode = ""

[[registry]]
  prefix = ""
  location = "docker.io"

  [[registry.mirror]]
    location = "mirror.example.com"
    pull-from-mirror = "digest-only"

Howerer there does not seem to be a way to have a ImageTagMirrorSet be created through this flow.

There is also no way to create a mirror with pull-from-mirror = "all"
as the setting but I imagine this is an opinionated thing in OpenShift itself.

From my testing it doesn't even seem like creating a ImageTagMirrorSet manually inside a hosted cluster has any effect, the mirrors specified are never added to /etc/containers/registries.conf.

Are there any plans for adding support for this? If there are no immediate plans, could someone point me in the right direction on where to start if it is possible to contribute to this? 🙂

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants