diff --git a/README.md b/README.md index c28460d7..1cf7b33c 100644 --- a/README.md +++ b/README.md @@ -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: -extra-config - - name: custom_py + - name: custom-py configMap: defaultMode: 420 items: diff --git a/roles/installer/templates/tower_deployment.yaml.j2 b/roles/installer/templates/tower_deployment.yaml.j2 index 68b4aa3c..75373deb 100644 --- a/roles/installer/templates/tower_deployment.yaml.j2 +++ b/roles/installer/templates/tower_deployment.yaml.j2 @@ -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