diff --git a/roles/installer/templates/config.yaml.j2 b/roles/installer/templates/config.yaml.j2 index 903994d1..8490dca9 100644 --- a/roles/installer/templates/config.yaml.j2 +++ b/roles/installer/templates/config.yaml.j2 @@ -25,6 +25,7 @@ data: ADMINS = () STATIC_ROOT = '/var/lib/awx/public/static' + STATIC_URL = '{{ (ingress_path + '/static/').replace('//', '/') }}' PROJECTS_ROOT = '/var/lib/awx/projects' JOBOUTPUT_ROOT = '/var/lib/awx/job_status' @@ -172,15 +173,15 @@ data: deny all; } - location /static/ { + location {{ (ingress_path + '/static').replace('//', '/') }} { alias /var/lib/awx/public/static/; } - location /favicon.ico { + location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} { alias /var/lib/awx/public/static/media/favicon.ico; } - location /websocket { + location {{ (ingress_path + '/websocket').replace('//', '/') }} { # Pass request to the upstream alias proxy_pass http://daphne; # Require http version 1.1 to allow for upgrade requests @@ -202,7 +203,7 @@ data: proxy_set_header Connection $connection_upgrade; } - location / { + location {{ ingress_path }} { # Add trailing / if missing rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent; uwsgi_read_timeout 120s; diff --git a/roles/installer/templates/deployment.yaml.j2 b/roles/installer/templates/deployment.yaml.j2 index 24e70c1e..4207a398 100644 --- a/roles/installer/templates/deployment.yaml.j2 +++ b/roles/installer/templates/deployment.yaml.j2 @@ -183,6 +183,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: UWSGI_MOUNT_PATH + value: "{{ ingress_path }}" {% if development_mode | bool %} - name: AWX_KUBE_DEVEL value: "1"