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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user