mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
expose settings to use custom volumes and volume mounts
This commit is contained in:
60
README.md
60
README.md
@@ -26,6 +26,7 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
|||||||
* [Containers Resource Requirements](#containers-resource-requirements)
|
* [Containers Resource Requirements](#containers-resource-requirements)
|
||||||
* [LDAP Certificate Authority](#ldap-certificate-authority)
|
* [LDAP Certificate Authority](#ldap-certificate-authority)
|
||||||
* [Persisting Projects Directory](#persisting-projects-directory)
|
* [Persisting Projects Directory](#persisting-projects-directory)
|
||||||
|
* [Custom Volume and Volume Mount Options](#custom-volume-volumemount-options)
|
||||||
* [Development](#development)
|
* [Development](#development)
|
||||||
* [Testing](#testing)
|
* [Testing](#testing)
|
||||||
* [Testing in Docker](#testing-in-docker)
|
* [Testing in Docker](#testing-in-docker)
|
||||||
@@ -410,6 +411,65 @@ spec:
|
|||||||
tower_projects_storage_size: 20Gi
|
tower_projects_storage_size: 20Gi
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Custom Volume and Volume Mount Options
|
||||||
|
|
||||||
|
In a scenario where custom volumes and volume mounts are required to either overwrite defaults or mount configuration files.
|
||||||
|
|
||||||
|
| Name | Description | Default |
|
||||||
|
| ------------------------------ | -------------------------------------------------------- | ------- |
|
||||||
|
| tower_extra_volumes | Specify extra volumes to add to the application pod | '' |
|
||||||
|
| tower_web_extra_volume_mounts | Specify volume mounts to be added to Web container | '' |
|
||||||
|
| tower_task_extra_volume_mounts | Specify volume mounts to be added to Task container | '' |
|
||||||
|
|
||||||
|
Example configuration for ConfigMap
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: <resourcename>-extra-config
|
||||||
|
namespace: <target namespace>
|
||||||
|
data:
|
||||||
|
ansible.cfg: |
|
||||||
|
[defaults]
|
||||||
|
remote_tmp = /tmp
|
||||||
|
[ssh_connection]
|
||||||
|
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
|
||||||
|
custom.py: |
|
||||||
|
INSIGHTS_URL_BASE = "example.org"
|
||||||
|
AWX_CLEANUP_PATHS = True
|
||||||
|
```
|
||||||
|
Example spec file for volumes and volume mounts
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
tower_task_extra_volume_mounts: |
|
||||||
|
- name: ansible_cfg
|
||||||
|
mountPath: /etc/ansible/ansible.cfg
|
||||||
|
subPath: ansible.cfg
|
||||||
|
- name: custom_py
|
||||||
|
mountPath: /etc/tower/conf.d/custom.py
|
||||||
|
subPath: custom.py
|
||||||
|
|
||||||
|
tower_extra_volumes: |
|
||||||
|
- name: ansible_cfg
|
||||||
|
configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
items:
|
||||||
|
- key: ansible.cfg
|
||||||
|
path: ansible.cfg
|
||||||
|
name: <resourcename>-extra-config
|
||||||
|
- name: custom_py
|
||||||
|
configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
items:
|
||||||
|
- key: custom.py
|
||||||
|
path: custom.py
|
||||||
|
name: <resourcename>-extra-config
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|||||||
@@ -215,8 +215,10 @@ spec:
|
|||||||
tower_web_extra_env:
|
tower_web_extra_env:
|
||||||
type: string
|
type: string
|
||||||
tower_task_extra_volume_mounts:
|
tower_task_extra_volume_mounts:
|
||||||
|
description: Specify volume mounts to be added to Task container
|
||||||
type: string
|
type: string
|
||||||
tower_web_extra_volume_mounts:
|
tower_web_extra_volume_mounts:
|
||||||
|
description: Specify volume mounts to be added to the Web container
|
||||||
type: string
|
type: string
|
||||||
tower_redis_image:
|
tower_redis_image:
|
||||||
description: Registry path to the redis container to use
|
description: Registry path to the redis container to use
|
||||||
|
|||||||
@@ -300,10 +300,11 @@ spec:
|
|||||||
- 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 Task Extra Volume Mounts
|
- displayName: Tower Task Extra Volume Mounts
|
||||||
|
description: Specify volume mounts to be added to Task container
|
||||||
path: tower_task_extra_volume_mounts
|
path: tower_task_extra_volume_mounts
|
||||||
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:text
|
||||||
- displayName: Tower Web Args
|
- displayName: Tower Web Args
|
||||||
path: tower_web_args
|
path: tower_web_args
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
@@ -320,11 +321,13 @@ spec:
|
|||||||
- 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 Web Extra Volume Mounts
|
- displayName: Tower Web Extra Volume Mounts
|
||||||
|
description: Specify volume mounts to be added to Web container
|
||||||
path: tower_web_extra_volume_mounts
|
path: tower_web_extra_volume_mounts
|
||||||
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:text
|
||||||
- displayName: Tower Extra Volumes
|
- displayName: Tower Extra Volumes
|
||||||
|
description: Specify extra volumes to add to the application pod
|
||||||
path: tower_extra_volumes
|
path: tower_extra_volumes
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ spec:
|
|||||||
tower_task_extra_env:
|
tower_task_extra_env:
|
||||||
type: string
|
type: string
|
||||||
tower_task_extra_volume_mounts:
|
tower_task_extra_volume_mounts:
|
||||||
|
description: Specify volume mounts to be added to Task container
|
||||||
type: string
|
type: string
|
||||||
tower_task_privileged:
|
tower_task_privileged:
|
||||||
default: false
|
default: false
|
||||||
@@ -268,6 +269,7 @@ spec:
|
|||||||
tower_web_extra_env:
|
tower_web_extra_env:
|
||||||
type: string
|
type: string
|
||||||
tower_web_extra_volume_mounts:
|
tower_web_extra_volume_mounts:
|
||||||
|
description: Specify volume mounts to be added to web container
|
||||||
type: string
|
type: string
|
||||||
tower_web_resource_requirements:
|
tower_web_resource_requirements:
|
||||||
description: Resource requirements for the web container
|
description: Resource requirements for the web container
|
||||||
|
|||||||
Reference in New Issue
Block a user