Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions roles/eda/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ event_stream_mtls: "{{ event_stream.mtls | default(true) }}"
event_stream_mtls_prefix_path: "mtls/{{ event_stream_prefix_path.strip('/') }}"
event_stream_prefix_path: "{{ event_stream.prefix | default('/eda-event-streams') }}"

# Leave empty for standalone deployments (SessionAuth + local resource management).
# Set to gateway URL when deploying behind Gateway (JWT-only auth).
resource_server_url: ''

# Disable UI container's nginx ipv6 listener
ipv6_disabled: false

Expand Down
11 changes: 11 additions & 0 deletions roles/eda/templates/eda.configmap.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ data:

EDA_STATIC_URL: /api/eda/static/

# Resource Server configuration
# Detect gateway deployment via either the operator variable or
# the extra_settings injected by the gateway-operator.
{% set _behind_gateway = (resource_server_url | default('') | length > 0) or (extra_settings | default([]) | selectattr('setting', 'equalto', 'EDA_RESOURCE_SERVER__URL') | list | length > 0) %}
{% if resource_server_url | default('') | length > 0 %}
EDA_RESOURCE_SERVER__URL: "{{ resource_server_url }}"
{% endif %}
{% if not _behind_gateway %}
EDA_ALLOW_LOCAL_RESOURCE_MANAGEMENT: "True"
{% endif %}
Comment on lines +40 to +46
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this logic

we shouldn't have to redefine EDA_RESOURCE_SERVER__URL since it's already injected via extra setting, it doesn't really make sense to have some logic here

for EDA_ALLOW_LOCAL_RESOURCE_MANAGEMENT we can probably just do what we're already doing for all operators and rely on public_base_url instead


# Custom user variables
{% for item in extra_settings | default([]) %}
{{ item.setting | upper }}: "{{ item.value }}"
Expand Down
Loading