fix(gateway,iroh-dns): tolerate legacy slash-encoded cluster names in remaining decoders#200
Merged
Merged
Conversation
… remaining decoders Follow-up to #199, which routed two of the downstream-resource label decoders through UpstreamClusterNameFromLabel. The same legacy slash-encoded meta.datumapis.com/upstream-cluster-name labels are decoded in four more places, which still fail the cluster lookup on every replica for resources written before #196: - gateway resource replicator - HTTPProxy controller (downstream Gateway watch) - TrafficProtectionPolicy controller (certificate-ready enqueue) - iroh-dns controller (decodeIrohClusterLabel) Route the first three through the shared helper, and strip the legacy leading slash in decodeIrohClusterLabel. Updates the iroh-dns round-trip test for the slash-less canonical form. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mattdjenkinson
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow-up to #199. That PR fixed two of the spots that decode the
meta.datumapis.com/upstream-cluster-namelabel back into a cluster name, but the same legacy slash-encoded labels (cluster-_<project>, written before #196) are decoded in four more places. Each still rebuilds/<project>, which no longer matches the slash-less name the provider engages — so reconciles for pre-#196 resources keep failing the cluster lookup and loggingcluster /<project> not foundon every replica, and their downstream→upstream event propagation stays broken.Fix
Route the remaining decoders through the shared
UpstreamClusterNameFromLabelhelper (added in #199), and strip the legacy leading slash in the iroh-dns controller's owndecodeIrohClusterLabel:gateway_resource_replicator_controller.go(replicator enqueue)httpproxy_controller.go(downstream Gateway watch)trafficprotectionpolicy_controller.go(certificate-ready enqueue)iroh_dns_controller.go(decodeIrohClusterLabel) + round-trip test updated for the slash-less canonical formNo data migration — existing resources keep resolving and re-stamp to the new label format on their next reconcile.
Follow-up to #199 / #196.