From 08c1cd39c9e060acebe154d10b5f880cdc5384c5 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 6 Mar 2023 14:44:29 -0500 Subject: [PATCH] Add deprecation messages Signed-off-by: Sebastian Malton --- .../core/src/renderer/components/+namespaces/store.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/src/renderer/components/+namespaces/store.ts b/packages/core/src/renderer/components/+namespaces/store.ts index 00732ba4e7..3435975fd6 100644 --- a/packages/core/src/renderer/components/+namespaces/store.ts +++ b/packages/core/src/renderer/components/+namespaces/store.ts @@ -60,15 +60,16 @@ export class NamespaceStore extends KubeObjectStore { return this.dependencies.storage.get() ?? []; } + /** + * @deprecated This doesn't contain the namespaces from cluster settings or from cluster context + */ @computed get allowedNamespaces(): string[] { - return Array.from(new Set([ - ...this.dependencies.context.allNamespaces, // allowed namespaces from cluster (main) - ...this.items.map(item => item.getName()), // loaded namespaces from k8s api - ].flat())); + return this.items.map(item => item.getName()); } /** * The list of selected namespace names (for filtering) + * @deprecated This doesn't contain the namespaces from cluster settings or from cluster context */ @computed get contextNamespaces() { if (!this.selectedNamespaces.length) { @@ -80,6 +81,7 @@ export class NamespaceStore extends KubeObjectStore { /** * The set of select namespace names (for filtering) + * @deprecated This doesn't contain the namespaces from cluster settings or from cluster context */ @computed get selectedNames(): Set { return new Set(this.contextNamespaces);