From ca26bac2a216dc5366ec20ba785a84714463ce3d Mon Sep 17 00:00:00 2001 From: Zeping Bai Date: Fri, 27 Dec 2024 10:51:06 +0800 Subject: [PATCH] fix(apisix): service missing hosts (#220) --- libs/backend-apisix/e2e/sync-and-dump-1.e2e-spec.ts | 1 + libs/backend-apisix/src/transformer.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libs/backend-apisix/e2e/sync-and-dump-1.e2e-spec.ts b/libs/backend-apisix/e2e/sync-and-dump-1.e2e-spec.ts index 8a316d5..c15043f 100644 --- a/libs/backend-apisix/e2e/sync-and-dump-1.e2e-spec.ts +++ b/libs/backend-apisix/e2e/sync-and-dump-1.e2e-spec.ts @@ -43,6 +43,7 @@ describe('Sync and Dump - 1', () => { const service1 = { name: service1Name, upstream: structuredClone(upstream), + hosts: ['example1.com', 'example2.com'], } as ADCSDK.Service; const service2Name = 'service2'; const service2 = { diff --git a/libs/backend-apisix/src/transformer.ts b/libs/backend-apisix/src/transformer.ts index 1b1b157..9d95b7a 100644 --- a/libs/backend-apisix/src/transformer.ts +++ b/libs/backend-apisix/src/transformer.ts @@ -45,6 +45,8 @@ export class ToADC { description: service.desc, labels: service.labels, + hosts: service.hosts, + upstream: service.upstream, plugins: service.plugins, } as ADCSDK.Service);