Use relatedImages to make disconnected deployments possible

* Add ability to pass images in from the CSV for disconnected installs

Signed-off-by: Christian M. Adams <chadams@redhat.com>
This commit is contained in:
Christian M. Adams
2021-10-21 11:40:13 -04:00
parent 071b67a814
commit 8aee279634
11 changed files with 96 additions and 10 deletions

View File

@@ -63,6 +63,17 @@
when:
- backup_pvc == '' or backup_pvc is not defined
- name: Set user provided postgres image
set_fact:
_custom_postgres_image: "{{ postgres_image }}:{{ postgres_image_version }}"
when:
- postgres_image | default([]) | length
- postgres_image_version is defined and postgres_image_version != ''
- name: Set Postgres image URL
set_fact:
_postgres_image: "{{ _custom_postgres_image | default(lookup('env', 'RELATED_IMAGE_POSTGRES')) }}"
- name: Create management pod from templated deployment config
k8s:
name: "{{ ansible_operator_meta.name }}-db-management"

View File

@@ -13,7 +13,7 @@ metadata:
spec:
containers:
- name: {{ ansible_operator_meta.name }}-db-management
image: "{{ postgres_image }}:{{ postgres_image_version }}"
image: "{{ _postgres_image }}"
imagePullPolicy: Always
command: ["sleep", "infinity"]
volumeMounts: