diff --git a/lib/nodes.js b/lib/nodes.js index 58c5554..240e306 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -16,8 +16,9 @@ import { Edge } from "./uuids.js"; const debug = new Debug(); const LABELS = { - host: "kubernetes.io/hostname", - control: "node-role.kubernetes.io/control-plane", + host: "kubernetes.io/hostname", + control: "node-role.kubernetes.io/control-plane", + specialised: "factoryplus.app.amrc.co.uk/specialised", }; export class Nodes { @@ -47,11 +48,16 @@ export class Nodes { value: obj => { const meta = obj.metadata; const info = obj.status.nodeInfo; + const specialised = obj.spec.taints + ?.filter(t => t.key == LABELS.specialised) + ?.map(t => t.value) + ?.[0]; return { hostname: meta.labels[LABELS.host], arch: info.architecture, k8s_version: info.kubeletVersion, control_plane: meta.labels[LABELS.control] == "true", + specialised, }; }, equal: deep_equal, diff --git a/package.json b/package.json index ac70e7f..3d10957 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acs-edge-sync", - "version": "0.0.2", + "version": "0.0.3", "description": "", "main": "index.js", "type": "module",