Skip to content

Event stream is not working as expected #285

@AGirin

Description

@AGirin

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: ansible/eda-server#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: >-
      <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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions