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 624 forks source link

Make the dockerimage location of the kube-rbac-proxy and controller in the config directory variable #916

Closed PaulVerhoeven1 closed 2 years ago

PaulVerhoeven1 commented 2 years ago
ISSUE TYPE
SUMMARY

To deploy the awx-operator you need to make a kustomization.yaml which deploys the contents of github.com/ansible/awx-operator/config/default

On 2 places in this directory you can find hardcoded locations where he tries to pull the dockerimages from. This is the kube-rbac-proxy (https://github.com/ansible/awx-operator/blob/071b67a8149755d2a0dceb69eb7f9929ebb58c0c/config/default/manager_auth_proxy_patch.yaml#L14) and the controller (https://github.com/ansible/awx-operator/blob/071b67a8149755d2a0dceb69eb7f9929ebb58c0c/config/manager/kustomization.yaml#L13)

On our network we have a constraint that we can't use public docker images, think about images from Dockerhub, Quay.io etc. It's possible to override those images for the postgres, init, awx and awx-ee with custom variables. See -> https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx. This is not possible for the kube-rbac-proxy and controller

Because of this we must download the complete source code from github and push it to our local git solution and do local modifications on it. After this we can pull those images from our private registry. This is not easy to maintain and we want to deploy the operator without any local modifications in git. Because of this i would like to make an enhancement request to make the dockerimage location in https://github.com/ansible/awx-operator/blob/071b67a8149755d2a0dceb69eb7f9929ebb58c0c/config/default/manager_auth_proxy_patch.yaml#L14 and (https://github.com/ansible/awx-operator/blob/071b67a8149755d2a0dceb69eb7f9929ebb58c0c/config/manager/kustomization.yaml#L13 also variable.

ENVIRONMENT
PaulVerhoeven1 commented 2 years ago

I fixed the issue, it's possible to override this image by setting custom images in the kustomization.yaml those images wil override images that are lower in the chain.

images:
  - name: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
    newName: <private_registry>/kubebuilder/kube-rbac-proxy
    newTag: v0.8.0
  - name: quay.io/ansible/awx-operator:latest
    newName: <private_registry>/ansible/awx-operator
    newTag: latest
BharathDevopz8 commented 9 months ago

Hi can you please provide me complete kustomization.yaml for using private registry images