mirror of
https://github.com/lensapp/lens.git
synced 2024-12-11 09:03:28 +03:00
Support kubernetes.io/role label for node roles (#155)
Signed-off-by: fernandocarletti <contato@fernandocarletti.net>
This commit is contained in:
parent
4ead24bd9d
commit
bef538c586
@ -109,6 +109,11 @@ export class Node extends KubeObject {
|
||||
const roleLabels = Object.keys(this.metadata.labels).filter(key =>
|
||||
key.includes("node-role.kubernetes.io")
|
||||
).map(key => key.match(/([^/]+$)/)[0]) // all after last slash
|
||||
|
||||
if (this.metadata.labels["kubernetes.io/role"] != undefined) {
|
||||
roleLabels.push(this.metadata.labels["kubernetes.io/role"])
|
||||
}
|
||||
|
||||
return roleLabels.join(", ")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user