Lua: Fix ExternalName services without endpoints. (#13429)

Co-authored-by: Neer Friedman <neerfri@gmail.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2025-05-27 22:38:16 -07:00 committed by GitHub
parent 8826c7106a
commit 85d9f16a30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 0 deletions

View file

@ -73,6 +73,10 @@ local function get_implementation(backend)
end
local function resolve_external_names(original_backend)
if not original_backend.endpoints or
#original_backend.endpoints == 0 then
return original_backend
end
local backend = util.deepcopy(original_backend)
local endpoints = {}
for _, endpoint in ipairs(backend.endpoints) do