Skip to content

set invalid Listener.SupportedKinds to empty list#4352

Merged
shawnh2 merged 2 commits intoenvoyproxy:mainfrom
arkodg:nil-supported-kind
Sep 28, 2024
Merged

set invalid Listener.SupportedKinds to empty list#4352
shawnh2 merged 2 commits intoenvoyproxy:mainfrom
arkodg:nil-supported-kind

Conversation

@arkodg
Copy link
Copy Markdown
Contributor

@arkodg arkodg commented Sep 27, 2024

@arkodg arkodg requested a review from a team as a code owner September 27, 2024 19:00
@arkodg arkodg requested a review from a team September 27, 2024 19:00
@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Sep 27, 2024

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
Copy link
Copy Markdown

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Arko Dasgupta <[email protected]>
@zirain
Copy link
Copy Markdown
Member

zirain commented Sep 28, 2024

/retest

@shawnh2 shawnh2 merged commit 2fdf069 into envoyproxy:main Sep 28, 2024
@arkodg arkodg deleted the nil-supported-kind branch October 1, 2024 00:02
guydc pushed a commit to guydc/gateway that referenced this pull request Oct 30, 2024
* set invalid Listener.SupportedKinds to empty list

Fixes: envoyproxy#4216

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

Signed-off-by: Arko Dasgupta <[email protected]>

* lint

Signed-off-by: Arko Dasgupta <[email protected]>

---------

Signed-off-by: Arko Dasgupta <[email protected]>
(cherry picked from commit 2fdf069)
Signed-off-by: Guy Daich <[email protected]>
guydc added a commit that referenced this pull request Oct 31, 2024
* build(deps): bump github.com/docker/docker from 27.2.0+incompatible to 27.3.1+incompatible (#4303)

build(deps): bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 27.2.0+incompatible to 27.3.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v27.2.0...v27.3.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Huabing Zhao <[email protected]>
(cherry picked from commit cd4e9b1)
Signed-off-by: Guy Daich <[email protected]>

* bugfix: EG loglevel error for admin and metrics module (#4340)

* bugfix: EG loglevel error for admin and metrics module

Signed-off-by: qicz <[email protected]>

* fix ut

Signed-off-by: qicz <[email protected]>

* polish

Signed-off-by: qicz <[email protected]>

---------

Signed-off-by: qicz <[email protected]>
(cherry picked from commit 9b161ee)
Signed-off-by: Guy Daich <[email protected]>

* fix: some status updates are discarded by the status updater (#4337)

Signed-off-by: Huabing Zhao <[email protected]>
(cherry picked from commit 14830c7)
Signed-off-by: Guy Daich <[email protected]>

* fix: Unsupported listener protocol type error for nil supportKinds assign gateway status. (#4345)

(cherry picked from commit 7babca9)
Signed-off-by: Guy Daich <[email protected]>

* set invalid Listener.SupportedKinds to empty list (#4352)

* set invalid Listener.SupportedKinds to empty list

Fixes: #4216

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

Signed-off-by: Arko Dasgupta <[email protected]>

* lint

Signed-off-by: Arko Dasgupta <[email protected]>

---------

Signed-off-by: Arko Dasgupta <[email protected]>
(cherry picked from commit 2fdf069)
Signed-off-by: Guy Daich <[email protected]>

* bugfix: ignore some unnecessary requests to apiserver. (#4362)

Signed-off-by: qicz <[email protected]>
Co-authored-by: zirain <[email protected]>
(cherry picked from commit fe1e8bd)
Signed-off-by: Guy Daich <[email protected]>

* fix: rateLimitDeployment ignoring pod labels and annotation merge (#4228)

* fix labels and annotation merges for rate limit deployment

Signed-off-by: Oscar Boher <[email protected]>

* fix tests and label merge

Signed-off-by: Oscar Boher <[email protected]>

* fix annotation merge if prometheus was disabled and annotations were defined

Signed-off-by: Oscar Boher <[email protected]>

* renamed labels and annotations to specify they apply to pods only

Signed-off-by: Oscar Boher <[email protected]>

* linter

Signed-off-by: Oscar Boher <[email protected]>

* fix resource provider tests to new annotation behavior

Signed-off-by: Oscar Boher <[email protected]>

* go linter

Signed-off-by: Oscar Boher <[email protected]>

* fix gen-check

Signed-off-by: Oscar Boher <[email protected]>

* pod labels selector comment

Signed-off-by: Oscar Boher <[email protected]>

---------

Signed-off-by: Oscar Boher <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
(cherry picked from commit cf84927)
Signed-off-by: Guy Daich <[email protected]>

* fix dashboard typos (#4422)

Signed-off-by: haorenfsa <[email protected]>
Signed-off-by: Guy Daich <[email protected]>

* fix: ratelimit not working with both headers and cidr matches  (#4377)

* fix ratelimit descriptors do not respect both headers and cidr match for one rule

Signed-off-by: shawnh2 <[email protected]>

* fix gen-check and lint

Signed-off-by: shawnh2 <[email protected]>

* fix ratelimit e2e test

Signed-off-by: shawnh2 <[email protected]>

* add more comment and update test case

Signed-off-by: shawnh2 <[email protected]>

---------

Signed-off-by: shawnh2 <[email protected]>
Co-authored-by: Huabing Zhao <[email protected]>
(cherry picked from commit 66c0b51)
Signed-off-by: Guy Daich <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Guy Daich <[email protected]>
Signed-off-by: qicz <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: Oscar Boher <[email protected]>
Signed-off-by: haorenfsa <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Huabing Zhao <[email protected]>
Co-authored-by: qi <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Oscar Boher <[email protected]>
Co-authored-by: shaoyue <[email protected]>
Co-authored-by: sh2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported listener protocol type should not cause an error while updating Gateway Status

3 participants