From 635f6caa0287202665238549c6fce0431ba8535f Mon Sep 17 00:00:00 2001 From: dayuy <973860441@qq.com> Date: Mon, 20 Feb 2023 14:59:07 +0800 Subject: [PATCH] fix: use string list in organization.status.federation (#123) --- src/kubernetes/lib/interfaces/crd/organization.ts | 6 +----- src/kubernetes/lib/interfaces/crd/proposal.ts | 10 ++++++++++ src/organization/organization.service.ts | 4 +--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/kubernetes/lib/interfaces/crd/organization.ts b/src/kubernetes/lib/interfaces/crd/organization.ts index e37b6b1..2f75351 100644 --- a/src/kubernetes/lib/interfaces/crd/organization.ts +++ b/src/kubernetes/lib/interfaces/crd/organization.ts @@ -352,11 +352,7 @@ export interface Organization { /** * Federations which this organization has been added */ - federations?: { - name?: string; - namespace?: string; - [k: string]: any; - }[]; + federations?: string[]; /** * LastHeartbeatTime is when the controller reconciled this component */ diff --git a/src/kubernetes/lib/interfaces/crd/proposal.ts b/src/kubernetes/lib/interfaces/crd/proposal.ts index 72366c6..d8a39b0 100644 --- a/src/kubernetes/lib/interfaces/crd/proposal.ts +++ b/src/kubernetes/lib/interfaces/crd/proposal.ts @@ -29,6 +29,11 @@ export interface Proposal { members: string[]; [k: string]: any; }; + archiveChannel?: { + channel: string; + description?: string; + [k: string]: any; + }; createFederation?: { [k: string]: any; }; @@ -52,6 +57,11 @@ export interface Proposal { */ policy: string; startAt?: string; + unarchiveChannel?: { + channel: string; + description?: string; + [k: string]: any; + }; [k: string]: any; }; status?: { diff --git a/src/organization/organization.service.ts b/src/organization/organization.service.ts index f68b3ab..e42a555 100644 --- a/src/organization/organization.service.ts +++ b/src/organization/organization.service.ts @@ -37,9 +37,7 @@ export class OrganizationService { status: org.status?.type, reason: org.status?.reason, clients: org.spec?.clients, - federations: org.status?.federations - ?.map((f) => f.name) - ?.filter((d) => !!d), + federations: org.status?.federations, }; }