Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose websockets on controller v2
Browse files Browse the repository at this point in the history
jamesmarshall24 committed Apr 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 6baf3a1 commit 4265ad5
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ service_type: ClusterIP
ingress_type: none
ingress_class_name: ''
ingress_path: '/'
api_urlpattern_prefix: ''
ingress_path_type: 'Prefix'
ingress_api_version: 'networking.k8s.io/v1'
# Add annotations to the service account. Specify as literal block. E.g.:
8 changes: 8 additions & 0 deletions roles/installer/templates/configmaps/config.yaml.j2
Original file line number Diff line number Diff line change
@@ -54,6 +54,10 @@ data:

INTERNAL_API_URL = 'http://127.0.0.1:8052'

{% if api_urlpattern_prefix | length > 0 %}
OPTIONAL_API_URLPATTERN_PREFIX = '{{ api_urlpattern_prefix }}'
{% endif %}

# Container environments don't like chroots
AWX_PROOT_ENABLED = False

@@ -188,7 +192,11 @@ data:
alias /var/lib/awx/public/static/media/favicon.ico;
}

{% if api_urlpattern_prefix | length > 0 %}
location ~ ^({{ (ingress_path + '/websocket/').replace('//', '/') }}|{{ (ingress_path + '/api/websocket/').replace('//', '/') }}|{{ (ingress_path + '/api/' + api_urlpattern_prefix + '/v2/websocket/').replace('//', '/') }}) {
{% else %}
location ~ ^({{ (ingress_path + '/websocket/').replace('//', '/') }}|{{ (ingress_path + '/api/websocket/').replace('//', '/') }}) {
{% endif %}
# Pass request to the upstream alias
proxy_pass http://daphne;
# Require http version 1.1 to allow for upgrade requests

0 comments on commit 4265ad5

Please sign in to comment.