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

Support for ImageTagMirrorSet via ImageContentSource in HostedCluster #5608

Open
stianfro opened this issue Feb 12, 2025 · 0 comments
Open

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? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant