added ability to mount conf.d and fixed underscore api issue

This commit is contained in:
Gabe Muniz
2021-04-14 15:58:52 -04:00
parent 8d65b84b89
commit 6c476a994e
2 changed files with 25 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
* [Containers Resource Requirements](#containers-resource-requirements)
* [LDAP Certificate Authority](#ldap-certificate-authority)
* [Persisting Projects Directory](#persisting-projects-directory)
* [Custom Volume and Volume Mount Options](#custom-volume-volumemount-options)
* [Custom Volume and Volume Mount Options](#custom-volume-volume-mount-options)
* [Development](#development)
* [Testing](#testing)
* [Testing in Docker](#testing-in-docker)
@@ -445,22 +445,22 @@ Example spec file for volumes and volume mounts
```yaml
---
tower_task_extra_volume_mounts: |
- name: ansible_cfg
- name: ansible-cfg
mountPath: /etc/ansible/ansible.cfg
subPath: ansible.cfg
- name: custom_py
- name: custom-py
mountPath: /etc/tower/conf.d/custom.py
subPath: custom.py
tower_extra_volumes: |
- name: ansible_cfg
- name: ansible-cfg
configMap:
defaultMode: 420
items:
- key: ansible.cfg
path: ansible.cfg
name: <resourcename>-extra-config
- name: custom_py
- name: custom-py
configMap:
defaultMode: 420
items:

View File

@@ -61,7 +61,16 @@ spec:
{% endif %}
volumeMounts:
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/"
mountPath: "/etc/tower/conf.d/execution_environments.py"
subPath: execution_environments.py
readOnly: true
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/credentials.py"
subPath: credentials.py
readOnly: true
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/ldap.py"
subPath: ldap.py
readOnly: true
{% if tower_ingress_type | lower == 'route' and tower_route_tls_termination_mechanism | lower == 'passthrough' %}
- name: "{{ meta.name }}-nginx-certs"
@@ -129,7 +138,16 @@ spec:
{% endif %}
volumeMounts:
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/"
mountPath: "/etc/tower/conf.d/execution_environments.py"
subPath: execution_environments.py
readOnly: true
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/credentials.py"
subPath: credentials.py
readOnly: true
- name: "{{ meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/ldap.py"
subPath: ldap.py
readOnly: true
- name: "{{ secret_key_secret_name }}"
mountPath: /etc/tower/SECRET_KEY