Skip to content

fix: Use quoted values zone annotation in topology injector#6133

Merged
arkodg merged 7 commits intoenvoyproxy:mainfrom
jukie:stringify-zone-values
May 27, 2025
Merged

fix: Use quoted values zone annotation in topology injector#6133
arkodg merged 7 commits intoenvoyproxy:mainfrom
jukie:stringify-zone-values

Conversation

@jukie
Copy link
Copy Markdown
Contributor

@jukie jukie commented May 21, 2025

What type of PR is this?

fix: fix integer zone values for topology injector

What this PR does / why we need it:
Injects quotations to the zone annotation value to ensure the rendered bootstrap config always results in a quoted string.

Which issue(s) this PR fixes:

Fixes #6117

Release Notes: Yes

@jukie jukie force-pushed the stringify-zone-values branch from 57d862d to c043613 Compare May 21, 2025 03:41
@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 21, 2025

Hey @dghubble could you try an image based on this commit in your environment? I'm still unable to reproduce your issue but this forcefully injects quotes to the zone annotation value so am curious to see if this resolves things for you.
I've pushed to docker.io/jukie/gateway-dev:quoted-zone-value (re-pushed after recent commits up to afb15b2) for convenience but you can also build manually from my branch via running the following in the cloned directory:
make go.build.linux_amd64.envoy-gateway && make go.build.linux_arm64.envoy-gateway && REGISTRY=your-registry TAG=some-tag make image.push.multiarch

@codecov
Copy link
Copy Markdown

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.58%. Comparing base (71d2f7d) to head (5ab54b1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6133      +/-   ##
==========================================
- Coverage   70.60%   70.58%   -0.02%     
==========================================
  Files         219      219              
  Lines       36514    36514              
==========================================
- Hits        25781    25775       -6     
- Misses       9203     9208       +5     
- Partials     1530     1531       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jukie jukie marked this pull request as ready for review May 21, 2025 04:02
@jukie jukie requested a review from a team as a code owner May 21, 2025 04:02
@jukie jukie changed the title quoted zone values fix: Use quoted values zone annotation in topology injector May 21, 2025
@owenhaynes
Copy link
Copy Markdown
Contributor

Is this what is causing the following error?

"error": "failed to create or update deployment envoy-gateway-system/...   failed to create/update resource with server-side apply for obj  ...  \"...\" is invalid: [spec.template.spec.containers[0].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty, spec.template.spec.containers[1].env[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty]

Have this with the topology injector on and off

@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 21, 2025

@owenhaynes could you share more info in #6117? Including the rendered pod yaml would be useful

@arkodg
Copy link
Copy Markdown
Contributor

arkodg commented May 22, 2025

hey curious what the annotation on envoy proxy looks like for the 0 case with kind ?

@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 22, 2025

In kind at v1.4.0:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    topology.kubernetes.io/zone: "0"

Both annotations and labels are map[string]string so the value can't be set to integer. I've been trying to deduce where else the parsing issue could be but my PR injects an additional set of quotations to hopefully avoid that.

apiVersion: v1
kind: Pod
metadata:
  annotations:
    topology.kubernetes.io/zone: '"0"'

@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 22, 2025

/retest

1 similar comment
@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 22, 2025

/retest

arkodg
arkodg previously approved these changes May 22, 2025
Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg requested review from a team May 22, 2025 23:39
@zirain
Copy link
Copy Markdown
Member

zirain commented May 22, 2025

'"0"' seems incorrect than "0"

@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 23, 2025

I'd agree and the only reason this is being added is to address parsing edge cases reported in #6117

I've still been unable to reproduce the reported issues there so I'd suggest waiting to merge this until @dghubble is able to add some more context or someone else is able to pinpoint where the problem is.

@zirain
Copy link
Copy Markdown
Member

zirain commented May 23, 2025

Yeah, #6133 (comment) seems should be another issue.

@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 23, 2025

Yup @owenhaynes opened a separate issue and already identified the bug there - #6117 (comment)

It's unrelated to zone aware routing

cnvergence
cnvergence previously approved these changes May 26, 2025
@jukie jukie dismissed stale reviews from cnvergence and arkodg via 1d7f4a1 May 26, 2025 22:24
@jukie
Copy link
Copy Markdown
Contributor Author

jukie commented May 27, 2025

/retest

@arkodg arkodg merged commit ea9cb05 into envoyproxy:main May 27, 2025
42 of 44 checks passed
@jukie jukie deleted the stringify-zone-values branch May 27, 2025 00:56
arkodg pushed a commit to arkodg/gateway that referenced this pull request Jun 3, 2025
…xy#6133)

* Quoted string for zone values

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

* release note

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

* regen

Signed-off-by: jukie <[email protected]>
(cherry picked from commit ea9cb05)
Signed-off-by: Arko Dasgupta <[email protected]>
arkodg added a commit that referenced this pull request Jun 4, 2025
* feat: set OverlappingTLSConfig condition for merged Gateways (#5862)

* set OverlappingTLSConfig condition for merged Gateways

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* fix lint

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* minor change

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit be51e5b)
Signed-off-by: Arko Dasgupta <[email protected]>

* e2e: fix backend tls test (#6029)

* fix backend tls test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* enable backend tls test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* remove gateway TLS to simplify the test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* rename secret to avoid conflicts

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit a685667)
Signed-off-by: Arko Dasgupta <[email protected]>

* validate gateway namespace mode and merged gateways (#6041)

* validate gateway namespace mode and merged gateways in translator

Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

* skip merge gateways test

Signed-off-by: Karol Szwaj <[email protected]>

* validate on gatewayclass and set the status

Signed-off-by: Karol Szwaj <[email protected]>

* skip e2e test

Signed-off-by: Karol Szwaj <[email protected]>

* add valid testcases

Signed-off-by: Karol Szwaj <[email protected]>

* Update internal/provider/kubernetes/controller.go

Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

* skip merge gateways test

Signed-off-by: Karol Szwaj <[email protected]>

* rebase

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
(cherry picked from commit c5f6831)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix shared=true when no clientSelector, (#6072)

* Fix shared=true when no clientSelector, cleanup filter logic, fix rl descriptor logic

Signed-off-by: Ryan Hristovski <[email protected]>

* testdata update

Signed-off-by: Ryan Hristovski <[email protected]>

* Linting, remove unused funcs

Signed-off-by: Ryan Hristovski <[email protected]>

* fix e2e

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit bb3c8da)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix(tranlator): SubjectAltNames were being dropped from BackendTLSPolicy.validation (#6092)

* Add support for SubjectAltNames from BackendTLSPolicy.validation

Signed-off-by: Ankush Agarwal <[email protected]>
(cherry picked from commit 35420d5)
Signed-off-by: Arko Dasgupta <[email protected]>

* feat: add ownerreference to infra resources when gateway namespace mode (#6100)

* feat: add ownerreference to infra resources when gateway namespace mode

Signed-off-by: kkk777-7 <[email protected]>
(cherry picked from commit fc462a8)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: add FullDuplexStreamed to enum (#6103)

* fix: add FullDuplexStreamed to enum

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

* fix: Use quoted values zone annotation in topology injector (#6133)

* Quoted string for zone values

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

* release note

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

* regen

Signed-off-by: jukie <[email protected]>
(cherry picked from commit ea9cb05)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: return early from buildwasms (#6169)

return early from buildwasms

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

* chore: bump go and purego (#6174)

* chore: bump go and purego

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

* fix  gen

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

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 40ae9e3)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: translate xds udp listener (#6183)

* fix: translate udp listener

Signed-off-by: kkk777-7 <[email protected]>

* add: tcp/udp no routes testdata in xds translator

Signed-off-by: kkk777-7 <[email protected]>

* add: release note

Signed-off-by: kkk777-7 <[email protected]>
(cherry picked from commit 8f538e7)
Signed-off-by: Arko Dasgupta <[email protected]>

* Change static uid to  for global ratelimit dashboard (#6193)

Signed-off-by: Emin Aktas <[email protected]>
(cherry picked from commit f721925)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix broken btp ratelimit merge (#6214)

* Fix broken btp ratelimit merge

Signed-off-by: Ryan Hristovski <[email protected]>

* lint

Signed-off-by: Ryan Hristovski <[email protected]>

---------

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit 0f6f363)
Signed-off-by: Arko Dasgupta <[email protected]>

* Keep ALPN configuration for listeners with overlapping certificates when ALPN is explicitly set via ClientTrafficPolicy (#6217)

Keep ALPN configuration for listeners with overlapping certificates when ALPN is explicitly set in ClientTrafficPolicy

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit de816a6)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix testdata

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

* Allow for headless envoy services (#6250)

* Allow for headless envoy services

Signed-off-by: Ryan Hristovski <[email protected]>

* Allow headless service, cleanup

Signed-off-by: Ryan Hristovski <[email protected]>

* clean

Signed-off-by: Ryan Hristovski <[email protected]>

* Add test and comment

Signed-off-by: Ryan Hristovski <[email protected]>

* Fix tests

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit 2e168a8)
Signed-off-by: Arko Dasgupta <[email protected]>

* remove infra ENVOY_GATEWAY_NAMESPACE and introduce ENVOY_POD_NAMESPACE envVar for accesslog (#6221)

* remove infra ENVOY_GATEWAY_NAMESPACE and introduce ENVOY_POD_NAMESPACE envVar for accesslog

Signed-off-by: Karol Szwaj <[email protected]>

* fix e2e test

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
(cherry picked from commit b7ed197)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix lint

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

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Ryan Hristovski <[email protected]>
Signed-off-by: Ankush Agarwal <[email protected]>
Signed-off-by: kkk777-7 <[email protected]>
Signed-off-by: Guy Daich <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: zirain <[email protected]>
Signed-off-by: Emin Aktas <[email protected]>
Co-authored-by: Huabing (Robin) Zhao <[email protected]>
Co-authored-by: Karol Szwaj <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Ryan Hristovski <[email protected]>
Co-authored-by: Ankush Agarwal <[email protected]>
Co-authored-by: Kota Kimura <[email protected]>
Co-authored-by: Guy Daich <[email protected]>
Co-authored-by: Isaac <[email protected]>
Co-authored-by: Emin AKTAS <[email protected]>
shawnh2 pushed a commit to shawnh2/gateway that referenced this pull request Sep 15, 2025
* feat: set OverlappingTLSConfig condition for merged Gateways (envoyproxy#5862)

* set OverlappingTLSConfig condition for merged Gateways

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* fix lint

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* minor change

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit be51e5b)
Signed-off-by: Arko Dasgupta <[email protected]>

* e2e: fix backend tls test (envoyproxy#6029)

* fix backend tls test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* enable backend tls test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* remove gateway TLS to simplify the test

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

* rename secret to avoid conflicts

Signed-off-by: Huabing (Robin) Zhao <[email protected]>

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit a685667)
Signed-off-by: Arko Dasgupta <[email protected]>

* validate gateway namespace mode and merged gateways (envoyproxy#6041)

* validate gateway namespace mode and merged gateways in translator

Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

* skip merge gateways test

Signed-off-by: Karol Szwaj <[email protected]>

* validate on gatewayclass and set the status

Signed-off-by: Karol Szwaj <[email protected]>

* skip e2e test

Signed-off-by: Karol Szwaj <[email protected]>

* add valid testcases

Signed-off-by: Karol Szwaj <[email protected]>

* Update internal/provider/kubernetes/controller.go

Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

* skip merge gateways test

Signed-off-by: Karol Szwaj <[email protected]>

* rebase

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
(cherry picked from commit c5f6831)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix shared=true when no clientSelector, (envoyproxy#6072)

* Fix shared=true when no clientSelector, cleanup filter logic, fix rl descriptor logic

Signed-off-by: Ryan Hristovski <[email protected]>

* testdata update

Signed-off-by: Ryan Hristovski <[email protected]>

* Linting, remove unused funcs

Signed-off-by: Ryan Hristovski <[email protected]>

* fix e2e

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit bb3c8da)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix(tranlator): SubjectAltNames were being dropped from BackendTLSPolicy.validation (envoyproxy#6092)

* Add support for SubjectAltNames from BackendTLSPolicy.validation

Signed-off-by: Ankush Agarwal <[email protected]>
(cherry picked from commit 35420d5)
Signed-off-by: Arko Dasgupta <[email protected]>

* feat: add ownerreference to infra resources when gateway namespace mode (envoyproxy#6100)

* feat: add ownerreference to infra resources when gateway namespace mode

Signed-off-by: kkk777-7 <[email protected]>
(cherry picked from commit fc462a8)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: add FullDuplexStreamed to enum (envoyproxy#6103)

* fix: add FullDuplexStreamed to enum

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

* fix: Use quoted values zone annotation in topology injector (envoyproxy#6133)

* Quoted string for zone values

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

* release note

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

* regen

Signed-off-by: jukie <[email protected]>
(cherry picked from commit ea9cb05)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: return early from buildwasms (envoyproxy#6169)

return early from buildwasms

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

* chore: bump go and purego (envoyproxy#6174)

* chore: bump go and purego

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

* fix  gen

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

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 40ae9e3)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: translate xds udp listener (envoyproxy#6183)

* fix: translate udp listener

Signed-off-by: kkk777-7 <[email protected]>

* add: tcp/udp no routes testdata in xds translator

Signed-off-by: kkk777-7 <[email protected]>

* add: release note

Signed-off-by: kkk777-7 <[email protected]>
(cherry picked from commit 8f538e7)
Signed-off-by: Arko Dasgupta <[email protected]>

* Change static uid to  for global ratelimit dashboard (envoyproxy#6193)

Signed-off-by: Emin Aktas <[email protected]>
(cherry picked from commit f721925)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix broken btp ratelimit merge (envoyproxy#6214)

* Fix broken btp ratelimit merge

Signed-off-by: Ryan Hristovski <[email protected]>

* lint

Signed-off-by: Ryan Hristovski <[email protected]>

---------

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit 0f6f363)
Signed-off-by: Arko Dasgupta <[email protected]>

* Keep ALPN configuration for listeners with overlapping certificates when ALPN is explicitly set via ClientTrafficPolicy (envoyproxy#6217)

Keep ALPN configuration for listeners with overlapping certificates when ALPN is explicitly set in ClientTrafficPolicy

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
(cherry picked from commit de816a6)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix testdata

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

* Allow for headless envoy services (envoyproxy#6250)

* Allow for headless envoy services

Signed-off-by: Ryan Hristovski <[email protected]>

* Allow headless service, cleanup

Signed-off-by: Ryan Hristovski <[email protected]>

* clean

Signed-off-by: Ryan Hristovski <[email protected]>

* Add test and comment

Signed-off-by: Ryan Hristovski <[email protected]>

* Fix tests

Signed-off-by: Ryan Hristovski <[email protected]>
(cherry picked from commit 2e168a8)
Signed-off-by: Arko Dasgupta <[email protected]>

* remove infra ENVOY_GATEWAY_NAMESPACE and introduce ENVOY_POD_NAMESPACE envVar for accesslog (envoyproxy#6221)

* remove infra ENVOY_GATEWAY_NAMESPACE and introduce ENVOY_POD_NAMESPACE envVar for accesslog

Signed-off-by: Karol Szwaj <[email protected]>

* fix e2e test

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
(cherry picked from commit b7ed197)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix lint

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

---------

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Ryan Hristovski <[email protected]>
Signed-off-by: Ankush Agarwal <[email protected]>
Signed-off-by: kkk777-7 <[email protected]>
Signed-off-by: Guy Daich <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: zirain <[email protected]>
Signed-off-by: Emin Aktas <[email protected]>
Co-authored-by: Huabing (Robin) Zhao <[email protected]>
Co-authored-by: Karol Szwaj <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Ryan Hristovski <[email protected]>
Co-authored-by: Ankush Agarwal <[email protected]>
Co-authored-by: Kota Kimura <[email protected]>
Co-authored-by: Guy Daich <[email protected]>
Co-authored-by: Isaac <[email protected]>
Co-authored-by: Emin AKTAS <[email protected]>
Signed-off-by: shawnh2 <[email protected]>
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Nov 17, 2025
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Feb 4, 2026
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Feb 4, 2026
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Feb 4, 2026
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Feb 4, 2026
6ixfalls added a commit to 6ixfalls/envoy-gateway that referenced this pull request Feb 4, 2026
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.

Topology-aware routing causes envoy proxy crashloops

5 participants