ansible / awx-operator

An Ansible AWX operator for Kubernetes built with Operator SDK and Ansible. 🤖
https://www.github.com/ansible/awx
Apache License 2.0
1.23k stars 623 forks source link

Support specifying a custom registry for all sources #1811

Open daneov opened 5 months ago

daneov commented 5 months ago

Please confirm the following

Feature Summary

Idea

Is there a 'global' field that I can use to override all references to quay.io?

Use-case:

In a corporate environment we make use of Artifactory as a pull-through-cache (for a variety of reasons).
We want to make sure AWX uses this same mechanism, but it's been quite a journey on how to achieve this.

Reasoning

So far I've found the following required fields when attempting to do this:

redis_image: docker.private.registry.com/redis
redis_image_version: latest # -- required, but it shouldn't be imo: #1441 
control_plane_ee_image: docker.private.registry.com/ansible/awx-ee:24.1.0
init_container_image: docker.private.registry.com/ansible/awx-ee
init_container_image_version: 24.1.0 # -- required, but it shouldn't be imo: #1441 
image: docker.private.registry.com/ansible/awx
image_version: 24.1.0 # -- required, but it shouldn't be imo: #1441 
ee_images:
  - name: Cached-EE
    image: docker.private.registry.com/ansible/awx-ee
postgres_image: docker.private.registry.com/sclorg/postgresql-15-c9s
postgres_image_version: latest

Aside from #1441, this leaves me with the following questions:

  1. Are there any I missed?
  2. Would it be possible to define a global 'registry' somehow, to ensure I don't miss anything?
kurokobo commented 5 months ago

@daneov Hi,

Are there any I missed?

In addition to your list, there is init_projects_container_image for AWX CR. Also. for Operator itself, you should replace registry.example.com/ansible/awx-operator and gcr.io/kubebuilder/kube-rbac-proxy with your mirror by kustomize or any way.

Would it be possible to define a global 'registry' somehow, to ensure I don't miss anything?

AFAIK currentry there is no such option to override container registry for all images. However, for your purposes, I think it would be more appropriate to specify your pull-through-cache as registry mirrors for the container runtime of your Kubernetes cluster (e.g. containerd), rather than having Operator provide this functionality.

daneov commented 5 months ago

Those images are indeed covered through Kustomize, I forgot to copy those.

re your last suggestion: I didn't even think of that, that'd be a great option indeed! Thanks for the pointer :)

RobinSegura commented 5 months ago

Indeed last suggestion is a good one ! except for us quay is not yet fully supported by our jfrog proxy. As a big IT Team a request would put days for artifactory behavior to be changed ... It would be much simpler for our team to change all registry mirror with a single endpoint (as current proxy behaviour can be fixed on our side just by removing "quay.io" in image header) but we have to do it once per image Anyway thanks for the heads-up ;)

Falltrades commented 1 month ago

Hi, I wonder if the team is interested in a PR to at least enable the possibility to override registry.example.com/ansible/awx-operator and gcr.io/kubebuilder/kube-rbac-proxy in the values.yaml ?