diff --git a/installer/inventory b/installer/inventory index 67c92706b9..b0959f35b5 100644 --- a/installer/inventory +++ b/installer/inventory @@ -133,7 +133,6 @@ secret_key=awxsecret # CA Trust directory. If you need to provide custom CA certificates, supplying # this variable causes this directory on the host to be bind mounted over # /etc/pki/ca-trust in the awx_task and awx_web containers. -# NOTE: only obeyed in local_docker install #ca_trust_dir=/etc/pki/ca-trust/source/anchors # Include /etc/nginx/awx_extra.conf diff --git a/installer/roles/kubernetes/templates/deployment.yml.j2 b/installer/roles/kubernetes/templates/deployment.yml.j2 index c45e5eb735..fe9a52817a 100644 --- a/installer/roles/kubernetes/templates/deployment.yml.j2 +++ b/installer/roles/kubernetes/templates/deployment.yml.j2 @@ -141,6 +141,16 @@ spec: ports: - containerPort: 8052 volumeMounts: +{% if ca_trust_dir is defined %} + - name: {{ kubernetes_deployment_name }}-ca-trust-dir + mountPath: "/etc/pki/ca-trust/source/anchors/" + readOnly: true +{% endif %} +{% if project_data_dir is defined %} + - name: {{ kubernetes_deployment_name }}-project-data-dir + mountPath: "/var/lib/awx/projects" + readOnly: false +{% endif %} - name: {{ kubernetes_deployment_name }}-application-config mountPath: "/etc/tower/settings.py" subPath: settings.py @@ -176,6 +186,11 @@ spec: - /usr/bin/launch_awx_task.sh imagePullPolicy: Always volumeMounts: +{% if ca_trust_dir is defined %} + - name: {{ kubernetes_deployment_name }}-ca-trust-dir + mountPath: "/etc/pki/ca-trust/source/anchors/" + readOnly: true +{% endif %} - name: {{ kubernetes_deployment_name }}-application-config mountPath: "/etc/tower/settings.py" subPath: settings.py @@ -274,6 +289,18 @@ spec: cpu: "{{ memcached_cpu_limit }}m" {% endif %} volumes: +{% if ca_trust_dir is defined %} + - name: {{ kubernetes_deployment_name }}-ca-trust-dir + hostPath: + path: "{{ ca_trust_dir }}" + type: Directory +{% endif %} +{% if project_data_dir is defined %} + - name: {{ kubernetes_deployment_name }}-project-data-dir + hostPath: + path: "{{ project_data_dir }}" + type: Directory +{% endif %} - name: {{ kubernetes_deployment_name }}-application-config configMap: name: {{ kubernetes_deployment_name }}-config