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

Customization of the init_projects_container_image is now possible #1248

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/crd/bases/awx.ansible.com_awxs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ spec:
init_container_extra_volume_mounts:
description: Specify volume mounts to be added to the init container
type: string
init_projects_container_image:
description: Registry path to the init projects container to use
type: string
postgres_image:
description: Registry path to the PostgreSQL container to use
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,12 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Init Projects Container image to use
displayName: Init Projects Container Image
path: init_projects_container_image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Secret where can be found the trusted Certificate Authority Bundle
path: bundle_cacert_secret
x-descriptors:
Expand Down
17 changes: 17 additions & 0 deletions roles/installer/tasks/set_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,20 @@
{{ _custom_init_container_image |
default(lookup('env', 'RELATED_IMAGE_AWX_INIT_CONTAINER')) |
default(_default_init_container_image, true) }}

- name: Set default awx init projects container image
set_fact:
_default_init_projects_container_image: "{{ _init_projects_container_image }}"

- name: Set user provided awx init projects image
set_fact:
_custom_init_projects_container_image: "{{ init_projects_container_image }}"
when:
- init_projects_container_image | default([]) | length

- name: Set Init projects image URL
set_fact:
_init_projects_container_image: >-
{{ _custom_init_projects_container_image |
default(lookup('env', 'RELATED_IMAGE_AWX_INIT_PROJECTS_CONTAINER')) |
default(_default_init_projects_container_image, true) }}