Updating Topology Aware Hints to support "Auto" value for annotation

Previously only "auto" was supported, a value that was inconsistent with
Kubernetes naming patterns.
This commit is contained in:
Rob Scott
2021-03-31 15:58:04 -07:00
parent a651804427
commit 50b377fe4e
9 changed files with 78 additions and 21 deletions

View File

@@ -386,11 +386,11 @@ func unchangedSlices(existingSlices, slicesToUpdate, slicesToDelete []*discovery
}
// hintsEnabled returns true if the provided annotations include a
// corev1.AnnotationTopologyAwareHints key with a value set to "auto".
// corev1.AnnotationTopologyAwareHints key with a value set to "Auto" or "auto".
func hintsEnabled(annotations map[string]string) bool {
val, ok := annotations[corev1.AnnotationTopologyAwareHints]
if !ok {
return false
}
return val == "auto"
return val == "Auto" || val == "auto"
}