Skip to content

[Bug]: UDP listener should be able to share a IP Port combo with a TCP/HTTP Listener  #6408

@j1m-ryan

Description

@j1m-ryan

Version

edge

What Kubernetes platforms are you running on?

Minikube

What happened?

A stream server block that looks like

stream {
  server {
      listen 127.0.0.1:80 udp;
  }
}

Should be allowed alongside a http server block that looks like

http {
  server {
     listen 127.0.0.1:80;
  }
}

Or another stream server block with a TCP listener on the same ip port combo

stream {
   #... previous server block above
  server {
      listen 127.0.0.1:80;
  }
}

This is valid NGINX but we don't allow this in the listeners.
Eg these listeners cause a warning in the Global Configuration, but should be valid

listeners:
      - name: some-udp
        port: 5353 
        protocol: UDP
      - name: some-http
        port: 5353
        protocol: HTTP

Steps to reproduce

Deploy a GC with

listeners:
      - name: some-udp
        port: 5353 
        protocol: UDP
      - name: some-http
        port: 5353
        protocol: HTTP

See the warning in the GC events

Warning  AddedOrUpdatedWithError  28s   nginx-ingress-controller  GlobalConfiguration default/my-release-nginx-ingress-controller is updated with errors: spec.listeners.port: Invalid value: 5353: Listener some-http: Port 5353 is used with a different protocol (current: UDP, new: HTTP)

Expected behaviour

No warning because its valid nginx

Kubectl Describe output

No response

Log output

No response

Contributing Guidelines

  • I confirm that I have read the Report a Bug section of the Contributing Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue reporting a potential bugready for refinementAn issue that was triaged and it is ready to be refined

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions