solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.07k stars 435 forks source link

Creating a custom gateway proxy with VS selector not configures the proxy correctly: no listening ports #8403

Open mtenrero opened 1 year ago

mtenrero commented 1 year ago

Gloo Edge Version

1.14.x (latest stable)

Kubernetes Version

1.24.x

Describe the bug

When defining several gatewayProxies using the Helm Chart, it's required to define the virtualService selector for properly routing traffic.

This works fine for proxies with just one port, (HTTP or HTTPS) But when configuring both HTTP and HTTPS ports, the proxy deployed is not able to open any port.

Helm config:

gatewayProxies:
  default: # Proxy name for public access (Internet facing)
    envoyLogLevel: debug
    disabled: false # overwrite the "default" value in the merge step
    kind:
      deployment:
        replicas: 1
    service:
      httpPort: 80
      httpsFirst: false
      httpsPort: 443
      type: LoadBalancer
    gatewaySettings:
      customHttpsGateway: # using the default HTTPS Gateway
        virtualServiceSelector:
          gateway-type: default # label set on the VirtualService
      customHttpGateway: # using the default HTTPS Gateway
        virtualServiceSelector:
          gateway-type: default # label set on the VirtualService

Generated GW Resources:

apiVersion: gateway.solo.io/v1
    kind: Gateway
    metadata:
      name: default
      namespace: default
      labels:
        app: gloo
    spec:
      bindAddress: "::"
      bindPort: 8080
      httpGateway:
        virtualServiceSelector:
          gateway-type: default
      useProxyProto: false
      ssl: false
      proxyNames:
      - default
    ---
    apiVersion: gateway.solo.io/v1
    kind: Gateway
    metadata:
      name: default-ssl
      namespace: default
      labels:
        app: gloo
    spec:
      bindAddress: "::"
      bindPort: 8443
      httpGateway:
        virtualServiceSelector:
          gateway-type: default
      useProxyProto: false
      ssl: true
      proxyNames:
      - default

Proxy listening ports:

/ $ netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      7/envoy
tcp        0      0 127.0.0.1:19000         0.0.0.0:*               LISTEN      7/envoy

Steps to reproduce the bug

  1. configure Helm Chart for deploying some gatewayProxies
  2. Configure at least one of them with customHttpsGateway and customHttpGateway (just one works fine)
  3. Deploy solution
  4. No Ports will be open by the proxy

Expected Behavior

Both Ports will be listening together

Additional Context

No response

github-actions[bot] commented 2 months ago

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.