Traefik EntryPoints/Routers Port Ranges

Dear Traefik Community,
I am trying to publish LocalStack ports through Traefik proxy. I can expose a single port for Localstack, but I am not clear on how to expose a port range for entry points using the Helm Chart, so I am hunting down answers on how to do this?

I have gone through the Traefik docs which show examples for Docker Compose but not for the Helm Chart. I have tried various configs with no joy
Localstack requires ports 4566:4566 and a port range of 4510-4559
What is the best way to accomplish this with Traefik?
I am using Helm Chart version 31.0.0

Below is where I have left it at.
image

      ls:
        ## -- Enable this entrypoint as a default entrypoint. When a service doesn't explicitly set an entrypoint it will only use this entrypoint.
        # asDefault: true
        port: 4566
        # hostPort: 4566
        #containerPort: 4566
        expose:
          default: true
        exposedPort: 4566
        tcp:
          routers:
            to-localstack:
              entryPoints:
                - "ls"
                - "ls-range"
              service: localstack
              rule: "Host(localstack.pangarabbit.com)"
        ## -- Different target traefik port on the cluster, useful for IP type LB
        # targetPort: 80
        ## -- The port protocol (TCP/UDP)
        protocol: TCP
      ls-range:
        ## -- Enable this entrypoint as a default entrypoint. When a service doesn't explicitly set an entrypoint it will only use this entrypoint.
        # asDefault: true
        port: 4510
        # hostPort: 4510
        #containerPort: 4510
        expose:
          default: true
        exposedPort: 4510
        tcp:
          routers:
            to-localstack:
              entryPoints:
                - "ls"
                - "ls-range"
              service: localstack
              rule: "Host(localstack.pangarabbit.com)"
        ## -- Different target traefik port on the cluster, useful for IP type LB
        # targetPort: 80
        ## -- The port protocol (TCP/UDP)
        protocol: TCP

Thank you very much.

Looks like I am winning now
Helm Chart

      localstack:
        ## -- Enable this entrypoint as a default entrypoint. When a service doesn't explicitly set an entrypoint it will only use this entrypoint.
        # asDefault: true
        port: 4566
        # hostPort: 4566
        containerPort: 4566
        expose:
          default: true
        exposedPort: 4566

IngressRoute in the dynamic config file in the helm chart

apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: localstack
  namespace: infrastructure
spec:
  entryPoints:
    - localstack
  routes:
    - match: Host("localstack.pangarabbit.com")
      kind: Rule
      services:
        - name: localstack
          namespace: infrastructure
          kind: Service
          port: 4566
    - match: Host("s3.localstack.pangarabbit.com")
      kind: Rule
      services:
        - name: localstack
          namespace: infrastructure
          kind: Service
          port: 4566
🕙 21:13:30 ✔️0 gooi🌽 ❯  curl -vvv http://localstack.pangarabbit.com:4566
granted session expired; reassuming localstack-pangarabbit
.[✔] [localstack-pangarabbit](us-east-1) session credentials ready
* Host localstack.pangarabbit.com:4566 was resolved.
* IPv6: (none)
* IPv4: 192.168.0.151
*   Trying 192.168.0.151:4566...
* Connected to localstack.pangarabbit.com (192.168.0.151) port 4566
> GET / HTTP/1.1
> Host: localstack.pangarabbit.com:4566
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 13 Sep 2024 19:13:34 GMT
< Server: TwistedWeb/24.3.0
<
* Connection #0 to host localstack.pangarabbit.com left intact
* Host s3.localstack.pangarabbit.com:4566 was resolved.
* IPv6: (none)
* IPv4: 192.168.0.151
*   Trying 192.168.0.151:4566...
* Connected to s3.localstack.pangarabbit.com (192.168.0.151) port 4566
> GET / HTTP/1.1
> Host: s3.localstack.pangarabbit.com:4566
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Content-Length: 270
< Content-Type: application/xml
< Date: Fri, 13 Sep 2024 19:13:47 GMT
< Server: TwistedWeb/24.3.0
< X-Amz-Id-2: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=
< X-Amz-Request-Id: 3871d175-3722-412f-b150-d2eb8db0beeb
<
<?xml version='1.0' encoding='utf-8'?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><DisplayName>webfile</DisplayName><ID>75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a</ID></Owner><Buckets /></ListAllMyBucketsResult>
* Connection #0 to host s3.localstack.pangarabbit.com left intact

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.