mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Merge pull request #589 from shanemcd/override-awx-image-in-tests
Allow for overridding awx image in tests
This commit is contained in:
@@ -4,12 +4,6 @@ kind: AWX
|
||||
metadata:
|
||||
name: example-awx
|
||||
spec:
|
||||
service_account_annotations: |
|
||||
foo: bar
|
||||
deployment_type: awx
|
||||
ingress_type: ingress
|
||||
ingress_annotations: |
|
||||
kubernetes.io/ingress.class: nginx
|
||||
web_resource_requirements:
|
||||
requests:
|
||||
cpu: 250m
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
27
molecule/default/templates/awx_cr_molecule.yml.j2
Normal file
27
molecule/default/templates/awx_cr_molecule.yml.j2
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user