More flexibility for customizing default EEs

This commit is contained in:
Shane McDonald
2021-04-03 17:15:56 -04:00
parent 862123e2d6
commit 4230120884
6 changed files with 37 additions and 11 deletions

View File

@@ -113,9 +113,16 @@ spec:
tower_image:
description: Registry path to the application container to use
type: string
tower_ee_image:
tower_ee_images:
description: Registry path to the Execution Environment container to use
type: string
type: array
items:
type: object
properties:
name:
type: string
image:
type: string
tower_image_pull_policy:
description: The image pull policy
type: string

View File

@@ -122,7 +122,7 @@ spec:
serviceAccountName: awx-operator
containers:
- name: awx-operator
image: "quay.io/ansible/awx-operator:0.7.0"
image: "quay.io/shanemcd/awx-operator:0.7.1"
imagePullPolicy: "Always"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
@@ -264,9 +264,17 @@ spec:
tower_image:
description: Registry path to the application container to use
type: string
tower_ee_image:
tower_ee_images:
description: Registry path to the Execution Environment container to use
type: string
type: array
items:
type: object
properties:
name:
type: string
image:
type: string
tower_image_pull_policy:
description: The image pull policy
type: string

View File

@@ -84,7 +84,10 @@ tower_extra_volumes: ''
tower_image: quay.io/ansible/awx:18.0.0
tower_image_pull_policy: IfNotPresent
tower_image_pull_secret: ''
tower_ee_image: quay.io/ansible/awx-ee:0.1.1
tower_ee_images:
- name: AWX EE 0.1.1
image: quay.io/ansible/awx-ee:0.1.1
tower_create_preload_data: true

View File

@@ -0,0 +1,5 @@
DEFAULT_EXECUTION_ENVIRONMENTS = [
{% for item in tower_ee_images %}
{'name': '{{ item.name }}' , 'image': '{{ item.image }}'}
{% endfor %}
]

View File

@@ -11,5 +11,6 @@ metadata:
app.kubernetes.io/managed-by: awx-operator
app.kubernetes.io/component: awx
data:
credentials_py: "{{ lookup('template', 'credentials.py.j2') | b64encode }}"
ldap_py: "{{ lookup('template', 'ldap.py.j2') | b64encode }}"
credentials.py: "{{ lookup('template', 'credentials.py.j2') | b64encode }}"
ldap.py: "{{ lookup('template', 'ldap.py.j2') | b64encode }}"
execution_environments.py: "{{ lookup('template', 'execution_environments.py.j2') | b64encode }}"

View File

@@ -183,7 +183,7 @@ spec:
{{ tower_task_extra_env | indent(width=12, indentfirst=True) }}
{% endif %}
resources: {{ tower_task_resource_requirements }}
- image: '{{ tower_ee_image }}'
- image: '{{ tower_ee_images[0].image }}'
name: '{{ meta.name }}-ee'
imagePullPolicy: '{{ tower_image_pull_policy }}'
args: ['receptor', '--config', '/etc/receptor.conf']
@@ -234,10 +234,12 @@ spec:
secret:
secretName: "{{ meta.name }}-app-credentials"
items:
- key: credentials_py
- key: credentials.py
path: 'credentials.py'
- key: ldap_py
- key: ldap.py
path: 'ldap.py'
- key: execution_environments.py
path: 'execution_environments.py'
- name: "{{ secret_key_secret_name }}"
secret:
secretName: '{{ secret_key_secret_name }}'