Skip to content

Commit

Permalink
validate: use constants for expected values
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ffromani committed Feb 13, 2022
1 parent 0a6b38a commit f771a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/validator/kubeletconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f771a17

Please sign in to comment.