mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Split container image and version in 2 variables
This commit is contained in:
30
README.md
30
README.md
@@ -255,12 +255,15 @@ spec:
|
|||||||
|
|
||||||
There are a few variables that are customizable for awx the image management.
|
There are a few variables that are customizable for awx the image management.
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description | Default |
|
||||||
| ----------------------- | -------------------------- |
|
| --------------------------| -------------------------- |------------------------------|
|
||||||
| tower_image | Path of the image to pull |
|
| tower_image | Path of the image to pull | quay.io/ansible/awx |
|
||||||
| tower_image_pull_policy | The pull policy to adopt |
|
| tower_image_version | Image version to pull | 19 |
|
||||||
| tower_image_pull_secret | The pull secret to use |
|
| tower_image_pull_policy | The pull policy to adopt | IfNotPresent |
|
||||||
| tower_ee_images | A list of EEs to register |
|
| tower_image_pull_secret | The pull secret to use | '' |
|
||||||
|
| tower_ee_images | A list of EEs to register | quay.io/ansible/awx-ee:0.1.1 |
|
||||||
|
| tower_redis_image | Path of the image to pull | docker.io/redis |
|
||||||
|
| tower_redis_image_version | Image version to pull | latest |
|
||||||
|
|
||||||
Example of customization could be:
|
Example of customization could be:
|
||||||
|
|
||||||
@@ -269,6 +272,7 @@ Example of customization could be:
|
|||||||
spec:
|
spec:
|
||||||
...
|
...
|
||||||
tower_image: myorg/my-custom-awx
|
tower_image: myorg/my-custom-awx
|
||||||
|
tower_image_version: latest
|
||||||
tower_image_pull_policy: Always
|
tower_image_pull_policy: Always
|
||||||
tower_image_pull_secret: pull_secret_name
|
tower_image_pull_secret: pull_secret_name
|
||||||
tower_ee_images:
|
tower_ee_images:
|
||||||
@@ -334,12 +338,14 @@ the AWX pods to run only on the nodes that match all the specified key/value pai
|
|||||||
pods to be scheduled onto nodes with matching taints.
|
pods to be scheduled onto nodes with matching taints.
|
||||||
|
|
||||||
|
|
||||||
| Name | Description | Default |
|
| Name | Description | Default |
|
||||||
| -------------------------- | --------------------------- | ------- |
|
| -------------------------------| --------------------------- | ------- |
|
||||||
| tower_node_selector | AWX pods' nodeSelector | '' |
|
| tower_postgres_image | Path of the image to pull | 12 |
|
||||||
| tower_tolerations | AWX pods' tolerations | '' |
|
| tower_postgres_image_version | Image version to pull | 12 |
|
||||||
| tower_postgres_selector | Postgres pods' nodeSelector | '' |
|
| tower_node_selector | AWX pods' nodeSelector | '' |
|
||||||
| tower_postgres_tolerations | Postgres pods' tolerations | '' |
|
| tower_tolerations | AWX pods' tolerations | '' |
|
||||||
|
| tower_postgres_selector | Postgres pods' nodeSelector | '' |
|
||||||
|
| tower_postgres_tolerations | Postgres pods' tolerations | '' |
|
||||||
|
|
||||||
Example of customization could be:
|
Example of customization could be:
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ spec:
|
|||||||
tower_image:
|
tower_image:
|
||||||
description: Registry path to the application container to use
|
description: Registry path to the application container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_image_version:
|
||||||
|
description: Application container image version to use
|
||||||
|
type: string
|
||||||
tower_ee_images:
|
tower_ee_images:
|
||||||
description: Registry path to the Execution Environment container to use
|
description: Registry path to the Execution Environment container to use
|
||||||
type: array
|
type: array
|
||||||
@@ -226,9 +229,15 @@ spec:
|
|||||||
tower_redis_image:
|
tower_redis_image:
|
||||||
description: Registry path to the redis container to use
|
description: Registry path to the redis container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_redis_image_version:
|
||||||
|
description: Redis container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_image:
|
tower_postgres_image:
|
||||||
description: Registry path to the PostgreSQL container to use
|
description: Registry path to the PostgreSQL container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_postgres_image_version:
|
||||||
|
description: PostgreSQL container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_selector:
|
tower_postgres_selector:
|
||||||
description: nodeSelector for the Postgres pods
|
description: nodeSelector for the Postgres pods
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -115,6 +115,9 @@ spec:
|
|||||||
tower_image:
|
tower_image:
|
||||||
description: Registry path to the application container to use
|
description: Registry path to the application container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_image_version:
|
||||||
|
description: Application container image version to use
|
||||||
|
type: string
|
||||||
tower_ee_images:
|
tower_ee_images:
|
||||||
description: Registry path to the Execution Environment container to use
|
description: Registry path to the Execution Environment container to use
|
||||||
type: array
|
type: array
|
||||||
@@ -223,9 +226,15 @@ spec:
|
|||||||
tower_redis_image:
|
tower_redis_image:
|
||||||
description: Registry path to the redis container to use
|
description: Registry path to the redis container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_redis_image_version:
|
||||||
|
description: Redis container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_image:
|
tower_postgres_image:
|
||||||
description: Registry path to the PostgreSQL container to use
|
description: Registry path to the PostgreSQL container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_postgres_image_version:
|
||||||
|
description: PostgreSQL container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_selector:
|
tower_postgres_selector:
|
||||||
description: nodeSelector for the Postgres pods
|
description: nodeSelector for the Postgres pods
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ spec:
|
|||||||
tower_image:
|
tower_image:
|
||||||
description: Registry path to the application container to use
|
description: Registry path to the application container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_image_version:
|
||||||
|
description: Application container image version to use
|
||||||
|
type: string
|
||||||
tower_ee_images:
|
tower_ee_images:
|
||||||
description: Registry path to the Execution Environment container to use
|
description: Registry path to the Execution Environment container to use
|
||||||
type: array
|
type: array
|
||||||
@@ -221,9 +224,15 @@ spec:
|
|||||||
tower_redis_image:
|
tower_redis_image:
|
||||||
description: Registry path to the redis container to use
|
description: Registry path to the redis container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_redis_image_version:
|
||||||
|
description: Redis container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_image:
|
tower_postgres_image:
|
||||||
description: Registry path to the PostgreSQL container to use
|
description: Registry path to the PostgreSQL container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_postgres_image_version:
|
||||||
|
description: PostgreSQL container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_selector:
|
tower_postgres_selector:
|
||||||
description: nodeSelector for the Postgres pods
|
description: nodeSelector for the Postgres pods
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -204,16 +204,31 @@ spec:
|
|||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: Tower Image Version
|
||||||
|
path: tower_image_version
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
- displayName: Redis Image
|
- displayName: Redis Image
|
||||||
path: tower_redis_image
|
path: tower_redis_image
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: Redis Image Version
|
||||||
|
path: tower_redis_image_version
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
- displayName: PostgreSQL Image
|
- displayName: PostgreSQL Image
|
||||||
path: tower_postgres_image
|
path: tower_postgres_image
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: PostgreSQL Image Version
|
||||||
|
path: tower_postgres_image_version
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
- displayName: Tower Postgres Selector
|
- displayName: Tower Postgres Selector
|
||||||
path: tower_postgres_selector
|
path: tower_postgres_selector
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ spec:
|
|||||||
tower_image:
|
tower_image:
|
||||||
description: Registry path to the application container to use
|
description: Registry path to the application container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_image_version:
|
||||||
|
description: Application container image version to use
|
||||||
|
type: string
|
||||||
tower_image_pull_policy:
|
tower_image_pull_policy:
|
||||||
default: IfNotPresent
|
default: IfNotPresent
|
||||||
description: The image pull policy
|
description: The image pull policy
|
||||||
@@ -134,6 +137,9 @@ spec:
|
|||||||
tower_postgres_image:
|
tower_postgres_image:
|
||||||
description: Registry path to the PostgreSQL container to use
|
description: Registry path to the PostgreSQL container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_postgres_image_version:
|
||||||
|
description: PostgreSQL container image version to use
|
||||||
|
type: string
|
||||||
tower_postgres_selector:
|
tower_postgres_selector:
|
||||||
description: nodeSelector for the Postgres pods
|
description: nodeSelector for the Postgres pods
|
||||||
type: string
|
type: string
|
||||||
@@ -193,6 +199,9 @@ spec:
|
|||||||
tower_redis_image:
|
tower_redis_image:
|
||||||
description: Registry path to the redis container to use
|
description: Registry path to the redis container to use
|
||||||
type: string
|
type: string
|
||||||
|
tower_redis_image_version:
|
||||||
|
description: Redis container image version to use
|
||||||
|
type: string
|
||||||
tower_replicas:
|
tower_replicas:
|
||||||
default: 1
|
default: 1
|
||||||
description: Number of instance replicas
|
description: Number of instance replicas
|
||||||
|
|||||||
@@ -81,7 +81,12 @@ tower_extra_volumes: ''
|
|||||||
|
|
||||||
# Use these image versions for Ansible AWX.
|
# Use these image versions for Ansible AWX.
|
||||||
|
|
||||||
tower_image: quay.io/ansible/awx:19.0.0
|
tower_image: quay.io/ansible/awx
|
||||||
|
tower_image_version: 19.0.0
|
||||||
|
tower_redis_image: docker.io/redis
|
||||||
|
tower_redis_image_version: latest
|
||||||
|
tower_postgres_image: postgres
|
||||||
|
tower_postgres_image_version: 12
|
||||||
tower_image_pull_policy: IfNotPresent
|
tower_image_pull_policy: IfNotPresent
|
||||||
tower_image_pull_secret: ''
|
tower_image_pull_secret: ''
|
||||||
|
|
||||||
@@ -127,9 +132,6 @@ tower_web_extra_env: ''
|
|||||||
tower_task_extra_volume_mounts: ''
|
tower_task_extra_volume_mounts: ''
|
||||||
tower_web_extra_volume_mounts: ''
|
tower_web_extra_volume_mounts: ''
|
||||||
tower_ee_extra_volume_mounts: ''
|
tower_ee_extra_volume_mounts: ''
|
||||||
tower_redis_image: redis:latest
|
|
||||||
|
|
||||||
tower_postgres_image: postgres:12
|
|
||||||
|
|
||||||
# Add a nodeSelector for the Postgres pods.
|
# Add a nodeSelector for the Postgres pods.
|
||||||
# It must match a node's labels for the pod to be scheduled on that node.
|
# It must match a node's labels for the pod to be scheduled on that node.
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
app.kubernetes.io/managed-by: awx-operator
|
app.kubernetes.io/managed-by: awx-operator
|
||||||
app.kubernetes.io/component: awx
|
app.kubernetes.io/component: awx
|
||||||
|
|
||||||
- name: Get current version
|
|
||||||
set_fact:
|
|
||||||
tower_image_version: "{{ tower_image.split(':')[1] }}"
|
|
||||||
|
|
||||||
- name: Include secret key configuration tasks
|
- name: Include secret key configuration tasks
|
||||||
include_tasks: secret_key_configuration.yml
|
include_tasks: secret_key_configuration.yml
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ spec:
|
|||||||
- name: {{ tower_image_pull_secret }}
|
- name: {{ tower_image_pull_secret }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
containers:
|
containers:
|
||||||
- image: '{{ tower_redis_image }}'
|
- image: '{{ tower_redis_image }}:{{ tower_redis_image_version }}'
|
||||||
name: redis
|
name: redis
|
||||||
args: ["redis-server", "/etc/redis.conf"]
|
args: ["redis-server", "/etc/redis.conf"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@@ -45,7 +45,7 @@ spec:
|
|||||||
mountPath: "/var/run/redis"
|
mountPath: "/var/run/redis"
|
||||||
- name: "{{ meta.name }}-redis-data"
|
- name: "{{ meta.name }}-redis-data"
|
||||||
mountPath: "/data"
|
mountPath: "/data"
|
||||||
- image: '{{ tower_image }}'
|
- image: '{{ tower_image }}:{{ tower_image_version }}'
|
||||||
name: '{{ meta.name }}-web'
|
name: '{{ meta.name }}-web'
|
||||||
{% if tower_web_command %}
|
{% if tower_web_command %}
|
||||||
command: {{ tower_web_command }}
|
command: {{ tower_web_command }}
|
||||||
@@ -123,7 +123,7 @@ spec:
|
|||||||
{{ tower_web_extra_env | indent(width=12, indentfirst=True) }}
|
{{ tower_web_extra_env | indent(width=12, indentfirst=True) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
resources: {{ tower_web_resource_requirements }}
|
resources: {{ tower_web_resource_requirements }}
|
||||||
- image: '{{ tower_image }}'
|
- image: '{{ tower_image }}:{{ tower_image_version }}'
|
||||||
name: '{{ meta.name }}-task'
|
name: '{{ meta.name }}-task'
|
||||||
imagePullPolicy: '{{ tower_image_pull_policy }}'
|
imagePullPolicy: '{{ tower_image_pull_policy }}'
|
||||||
{% if tower_task_privileged == true %}
|
{% if tower_task_privileged == true %}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ spec:
|
|||||||
app.kubernetes.io/component: database
|
app.kubernetes.io/component: database
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: '{{ tower_postgres_image }}'
|
- image: '{{ tower_postgres_image }}:{{ tower_postgres_image_version }}'
|
||||||
name: postgres
|
name: postgres
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_DB
|
- name: POSTGRES_DB
|
||||||
|
|||||||
Reference in New Issue
Block a user