ansible / ansible/eda-server-operator

Event stream is not working as expected

Open
#285 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jinja
Stars
45
Forks
41
Avg merge
2d
Merged PRs (30d)
1

Description

I have enable Ingress and UI/API works just fine. But event streams do not. URL displayed in UI is not correct. You can get more info here: https://github.com/ansible/eda-server/issues/1278

I see there are two rules in ALB created by operator - one for UI and one for event streams. When I use URL displayed in UI like:

https://test.test.local/eda-event-streams/api/eda/v1/external_event_stream//post/ I get 405 error from nginx.

If I remove eda-event-strems from URL like this:

https://test.test.local/api/eda/v1/external_event_stream//post/

things work as expected. According to EDA server guys this is not entirely correct as at this point we use API workers to receive events not event stream ones.

This is my config for EDA operator:

```
apiVersion: eda.ansible.com/v1alpha1
kind: EDA
metadata:
name: eda-test
namespace: eda
spec:
ingress_type: ingress
ingress_path: /
ingress_path_type: Prefix
ingress_annotations: |
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/scheme: internal
alb.ingress.kubernetes.io/certificate-arn: >-

alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=1800,routing.http.drop_invalid_header_fields.enabled=true,routing.http2.enabled=true
alb.ingress.kubernetes.io/tags: application=eda-test
hostname: test.test.local
no_log: false
automation_server_url: https://awx.test.local:443
database:
postgres_data_volume_init: true
public_base_url: https://test.test.local/
extra_settings:
- setting: ALLOW_LOCAL_ASSIGNING_JWT_ROLES
value: "true"
- setting: EDA_MAX_RUNNING_ACTIVATIONS
value: "16"
```

I see there are two template files to create Ingress for event streams:

https://github.com/ansible/eda-server-operator/blob/main/roles/eda/templates/eda-event-stream.ingress.yaml.j2

and

https://github.com/ansible/eda-server-operator/blob/main/roles/eda/templates/eda-ui.ingress.yaml.j2

I believe last one was used to configure my Ingress, as it includes both UI and Event Streams.

Image

Both rules use the same host header test.test.local.

Am I missing something in my setup?

Contributor guide

Open the contributing guide

Research direction

Start with roles/eda/templates/eda-event-stream.ingress.yaml.j2 and roles/eda/templates/eda-ui.ingress.yaml.j2, then compare their rendered Ingress rules for the supplied configuration. Verify that the event-stream endpoint is routed to the expected service and that the UI-displayed URL matches the working path; done means event posts succeed through the advertised URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kubernetes
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.