envoyproxy / gateway

Manages Envoy Proxy as a Standalone or Kubernetes-based Application Gateway
https://gateway.envoyproxy.io
Apache License 2.0
1.63k stars 352 forks source link

set invalid Listener.SupportedKinds to empty list #4352

Closed arkodg closed 1 month ago

arkodg commented 1 month ago

Fixes: https://github.com/envoyproxy/gateway/issues/4216

Relates to https://kubernetes.slack.com/archives/CR0H13KGA/p1727457195236889

arkodg commented 1 month ago
apiVersion: v1
items:
- apiVersion: gateway.networking.k8s.io/v1
  kind: Gateway
  metadata:
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-production
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"gateway.networking.k8s.io/v1","kind":"Gateway","metadata":{"annotations":{"cert-manager.io/cluster-issuer":"letsencrypt-production"},"name":"https","namespace":"default"},"spec":{"gatewayClassName":"envoy-proxy","listeners":[{"allowedRoutes":{"namespaces":{"from":"All"}},"hostname":"grpc.example.com","name":"grpc.example.com","port":443,"protocol":"GRPC"}]}}
    creationTimestamp: "2024-09-27T18:39:12Z"
    generation: 1
    name: https
    namespace: default
    resourceVersion: "767"
    uid: 70692347-eab4-4051-bd72-5ec5c31d7093
  spec:
    gatewayClassName: envoy-proxy
    listeners:
    - allowedRoutes:
        namespaces:
          from: All
      hostname: grpc.example.com
      name: grpc.example.com
      port: 443
      protocol: GRPC
  status:
    conditions:
    - lastTransitionTime: "2024-09-27T18:39:13Z"
      message: The Gateway has been scheduled by Envoy Gateway
      observedGeneration: 1
      reason: Accepted
      status: "True"
      type: Accepted
    - lastTransitionTime: "2024-09-27T18:39:13Z"
      message: No addresses have been assigned to the Gateway
      observedGeneration: 1
      reason: AddressNotAssigned
      status: "False"
      type: Programmed
    listeners:
    - attachedRoutes: 0
      conditions:
      - lastTransitionTime: "2024-09-27T18:39:13Z"
        message: Protocol GRPC is unsupported, must be HTTP, HTTPS, TCP or UDP.
        observedGeneration: 1
        reason: UnsupportedProtocol
        status: "False"
        type: Accepted
      - lastTransitionTime: "2024-09-27T18:39:13Z"
        message: Listener is invalid, see other Conditions for details.
        observedGeneration: 1
        reason: Invalid
        status: "False"
        type: Programmed
      - lastTransitionTime: "2024-09-27T18:39:13Z"
        message: Listener references have been resolved
        observedGeneration: 1
        reason: ResolvedRefs
        status: "True"
        type: ResolvedRefs
      name: grpc.example.com
      supportedKinds: []
kind: List
metadata:
  resourceVersion: ""
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.00%. Comparing base (d895da3) to head (a98573d). Report is 68 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4352 +/- ## ========================================== - Coverage 66.00% 66.00% -0.01% ========================================== Files 197 197 Lines 23964 23965 +1 ========================================== Hits 15817 15817 - Misses 7021 7022 +1 Partials 1126 1126 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zirain commented 1 month ago

/retest