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.24k stars 626 forks source link

Cant customize image for init_receptor container #1905

Closed Kiros123 closed 2 months ago

Kiros123 commented 3 months ago

Please confirm the following

Bug Summary

I can't customize the image used for the init-receptor container; I need to build the entire delivery from repositories located in private registries.

AWX Operator version

2.18.0

AWX version

24.5.0

Kubernetes platform

kubernetes

Kubernetes/Platform version

1.3.0

Modifications

no

Steps to reproduce

try to run operator with values:

AWX:
  enabled: true
  name: awx
  postgres:
    dbName: Unset
    enabled: false
    host: Unset
    password: Unset
    port: 5678
    sslmode: prefer
    type: unmanaged
    username: admin
  spec:
    admin_user: admin
    control_plane_ee_image: app-registry01.example/devops/awx-ee:2.4.0
    ee_images:
    - image: app-registry01.example/devops/awx-ee:2.4.0
      name: AWX Demo EE
    hostname: awx.example.com
    image: app-registry01.example/devops/awx
    image_version: latest
    postgres_image: app-registry01.example/devops/postgresql-15-c9s
    postgres_image_version: latest
    postgres_data_volume_init: true
    redis_image: app-registry01.example/devops/sentry/redis
    redis_image_version: 7.0.11-debian-11-r12
    service_type: ClusterIP
    init_container_image: app-registry01.example/devops/awx-ee:2.4.0
    image_pull_secrets:
    - harbor-regcred

Expected results

init-receptor image should be sourced from custom private registry

Actual results

All images are sourced from these variables, except for the init-receptor container image. There are no traces in the CR or config maps. I tried rebuilding the container with the operator and hardcoding all mentions of quay.io/ansible/awx-ee, but the result is the same.

init-receptor Status waiting Image quay.io/ansible/awx-ee:24.5.0 Environment MY_POD_NAME : fieldRef(v1:metadata.name) Mounts /etc/receptor/tls/ca/mesh-CA.crt from awx-receptor-ca (ro) /etc/receptor/tls/ca/mesh-CA.key from awx-receptor-ca (ro) /etc/receptor/tls/ from awx-receptor-tls (rw) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-f5s7j (ro) Command /bin/sh -c hostname=$MY_POD_NAME receptor --cert-makereq \ bits=2048 \ commonname=$hostname \ dnsname=$hostname \ nodeid=$hostname \ outreq=/etc/receptor/tls/receptor.req \ outkey=/etc/receptor/tls/receptor.key receptor --cert-signreq \ req=/etc/receptor/tls/receptor.req \ cacert=/etc/receptor/tls/ca/mesh-CA.crt \ cakey=/etc/receptor/tls/ca/mesh-CA.key \ outcert=/etc/receptor/tls/receptor.crt \ notafter=$(date --iso-8601=seconds --utc --date "10 years") \ verify=yes

kurokobo commented 3 months ago

Try this:

AWX:
  enabled: true
  ...
  spec:
    ...
    init_container_image: app-registry01.example/devops/awx-ee
    init_container_image_version: 2.4.0

Refer to the docs: https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/deploying-a-specific-version-of-awx.html

djyasin commented 3 months ago

@Kiros123 were you able to resolve this with the above feedback?

djyasin commented 2 months ago

@Kiros123 we haven't heard back from you in awhile. Based on that, we are going to go ahead and close this issue. You may absolutely open a new issue and link to this issue if this is not resolved.

Thank you for your time!