[feature] add ability to specify prefix to pull offline/local images from

Bug #1833594 reported by Jeff Hillman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
Triaged
Wishlist
Unassigned

Bug Description

In an offline/local deploy of kubernetes, customer create their own private docker repo/registry.

In these cases, customers are not always wanting to keep the same expected labels for proper organization per team/group/usage.

Specifically, something like

k8s.gcr.io/pause:3.1
docker.io/library/busybox:1.29

they might want to lump them together for

k8s-deploy/pause:3.1
k8s-deploy/busybox:1.29

The current tooling does not allow for this. We can specify an offline/private registry (in some cases), but not a prefix in that registry.

Tags: cpe-onsite
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

I think we can find a nice way to truncate image prefixes, but we would then expect all images to be in a flat structure at the configured image-registry.

That may cover a majority of private registry users, but I think we'll have some that want certain images (maybe storage-related) to come from a ./k8s-storage prefix and others (maybe ingress) to come from a ./k8s-ingress prefix. That scenario would be more difficult to accommodate -- the only solution I have for that today would be to expose config for every image that could possibly be used in a CDK deploy, and that's a mess.

Thanks for the bug report; it's certainly something we'll hash out.

Revision history for this message
Mike Wilson (knobby) wrote :

You can include a prefix on the image-registry config option. It wouldn’t smash the paths currently, but it would certainly add to it. Set to 10.0.0.1:5000/my-images would look for 10.0.0.1:5000/my-images/pause:3.1 and 10.0.0.1:5000/my-images/library/busybox:1.29. This may not be 100% what is desired, but it is available today.

Revision history for this message
Joe Guo (guoqiao) wrote :

According to doc[0], add a registry as "*" may do the work:

     [plugins.cri.registry]
      [plugins.cri.registry.mirrors]
        ...
        [plugins.cri.registry.mirrors."*"]
          endpoint = ["http://34.235.169.214:5000"]
        ...

The `*` is registry host, which is also image prefix, it will match any image.

[0]: https://github.com/containerd/cri/blob/master/docs/registry.md#configure-registry-endpoint

George Kraft (cynerva)
no longer affects: charm-kubernetes-e2e
Changed in charm-kubernetes-master:
importance: Undecided → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.