ipmi-exporter: fix running on VMs
At the moment, ipmi-exporter is also running on VMs which it
should not be.
Sem-Ver: bugfix
Change-Id: I1e620120d1c442c677a83ba7f37f8e862f634275
diff --git a/roles/ipmi_exporter/tasks/main.yml b/roles/ipmi_exporter/tasks/main.yml
index b356139..6d93c10 100644
--- a/roles/ipmi_exporter/tasks/main.yml
+++ b/roles/ipmi_exporter/tasks/main.yml
@@ -70,6 +70,14 @@
- name: ipmi-exporter
configMap:
name: ipmi-exporter
+ affinity:
+ nodeAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: feature.node.kubernetes.io/cpu-cpuid.HYPERVISOR
+ operator: NotIn
+ values: ["true"]
nodeSelector:
feature.node.kubernetes.io/ipmi: "true"