Skip to content

Commit

Permalink
fix: use string list in organization.status.federation (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
dayuy authored and Carrotzpc committed Feb 20, 2023
1 parent 88b6a49 commit 635f6ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/kubernetes/lib/interfaces/crd/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
10 changes: 10 additions & 0 deletions src/kubernetes/lib/interfaces/crd/proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export interface Proposal {
members: string[];
[k: string]: any;
};
archiveChannel?: {
channel: string;
description?: string;
[k: string]: any;
};
createFederation?: {
[k: string]: any;
};
Expand All @@ -52,6 +57,11 @@ export interface Proposal {
*/
policy: string;
startAt?: string;
unarchiveChannel?: {
channel: string;
description?: string;
[k: string]: any;
};
[k: string]: any;
};
status?: {
Expand Down
4 changes: 1 addition & 3 deletions src/organization/organization.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down

0 comments on commit 635f6ca

Please sign in to comment.