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:
1 parent
f0e0dd1ba7
commit
bdc42901ba
1 file changed
+2
-4
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user