1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

chore: Cleanup Namespace.isControlledByHNC

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-04-21 09:53:02 -04:00
parent f0e0dd1ba7
commit bdc42901ba

View File

@ -34,7 +34,7 @@ export class Namespace extends KubeObject<
return this.status?.phase ?? "-";
}
isSubnamespace() {
isSubnamespace() {
return this.getAnnotations().find(annotation => annotation.includes("hnc.x-k8s.io/subnamespace-of"));
}
@ -43,9 +43,7 @@ export class Namespace extends KubeObject<
}
isControlledByHNC() {
const hierarchicalNamesaceControllerLabel = "hnc.x-k8s.io/included-namespace=true";
return this.getLabels().find(label => label === hierarchicalNamesaceControllerLabel);
return this.getLabels().includes("hnc.x-k8s.io/included-namespace=true");
}
}