Allow for overridding awx image in tests

This commit is contained in:
Shane McDonald
2021-10-06 19:57:16 -04:00
parent 391e0bb1b8
commit 2426956a0a
5 changed files with 32 additions and 9 deletions

View File

@@ -21,6 +21,8 @@ provisioner:
namespace: ${TEST_OPERATOR_NAMESPACE:-osdk-test}
host_vars:
localhost:
awx_image: ${AWX_TEST_IMAGE:-""}
awx_version: ${AWX_TEST_VERSION:-""}
ansible_python_interpreter: '{{ ansible_playbook_python }}'
config_dir: ${MOLECULE_PROJECT_DIRECTORY}/config
samples_dir: ${MOLECULE_PROJECT_DIRECTORY}/config/samples

View File

@@ -3,15 +3,13 @@
k8s:
state: present
namespace: '{{ namespace }}'
definition: "{{ lookup('template', '/'.join([samples_dir, cr_file])) | from_yaml }}"
definition: "{{ lookup('template', 'awx_cr_molecule.yml.j2') | from_yaml }}"
wait: yes
wait_timeout: 900
wait_condition:
type: Running
reason: Successful
status: "True"
vars:
cr_file: 'awx_v1beta1_awx.yaml'
- name: Obtain generated admin password
k8s_info:

View File

@@ -0,0 +1,27 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: example-awx
spec:
{% if awx_image %}
image: {{ awx_image }}
{% endif %}
{% if awx_version %}
image_version: {{ awx_version }}
{% endif %}
ingress_type: ingress
ingress_annotations: |
kubernetes.io/ingress.class: nginx
web_resource_requirements:
requests:
cpu: 250m
memory: 128M
task_resource_requirements:
requests:
cpu: 250m
memory: 128M
ee_resource_requirements:
requests:
cpu: 200m
memory: 64M

View File

@@ -23,6 +23,8 @@ provisioner:
namespace: ${TEST_OPERATOR_NAMESPACE:-osdk-test}
host_vars:
localhost:
awx_image: ${AWX_TEST_IMAGE:-""}
awx_version: ${AWX_TEST_VERSION:-""}
ansible_python_interpreter: '{{ ansible_playbook_python }}'
config_dir: ${MOLECULE_PROJECT_DIRECTORY}/config
samples_dir: ${MOLECULE_PROJECT_DIRECTORY}/config/samples