diff --git a/cmd/k8s-node-labeller/main.go b/cmd/k8s-node-labeller/main.go index 667b324d..4e58a471 100644 --- a/cmd/k8s-node-labeller/main.go +++ b/cmd/k8s-node-labeller/main.go @@ -49,6 +49,15 @@ func createLabels(kind string, entries map[string]int) map[string]string { } } + prefix = createLabelPrefix(kind, false) + for k, v := range entries { + if (len(entries) == 1) { + labels[prefix] = k + } else { + labels[fmt.Sprintf("%s.%s", prefix, k)] = strconv.Itoa(v) + } + } + return labels }