From f771a17c91a9bd724bf1f7f15e7a5173708bd33e Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Sun, 13 Feb 2022 11:09:27 +0100 Subject: [PATCH] validate: use constants for expected values It's a bit silly to use a constant for the expected value in the reporting but not in the actual check, so let's fix this using the named constant in both places. Signed-off-by: Francesco Romani --- pkg/validator/kubeletconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/validator/kubeletconfig.go b/pkg/validator/kubeletconfig.go index 111cde69..b5edc3a4 100644 --- a/pkg/validator/kubeletconfig.go +++ b/pkg/validator/kubeletconfig.go @@ -136,7 +136,7 @@ func ValidateClusterNodeKubeletConfig(nodeName string, nodeVersion *version.Info } } - if kubeletConf.CPUManagerPolicy != "static" { + if kubeletConf.CPUManagerPolicy != ExpectedCPUManagerPolicy { vrs = append(vrs, ValidationResult{ Node: nodeName, Area: AreaKubelet, @@ -170,7 +170,7 @@ func ValidateClusterNodeKubeletConfig(nodeName string, nodeVersion *version.Info }) } - if kubeletConf.TopologyManagerPolicy != "single-numa-node" { + if kubeletConf.TopologyManagerPolicy != ExpectedTopologyManagerPolicy { vrs = append(vrs, ValidationResult{ Node: nodeName, Area: AreaKubelet,