apiserver: fix lint issue, defaulting and validation test for flowcontrol v1

This commit is contained in:
Abu Kashem
2023-10-11 14:03:42 -04:00
parent 90c091deda
commit 430c226709
5 changed files with 13 additions and 10 deletions

View File

@@ -199,7 +199,7 @@ func (s *strategy[ObjectType]) ReviseIfNeeded(objectOps objectLocalOps[ObjectTyp
// shouldUpdateSpec inspects the auto-update annotation key and generation field to determine
// whether the config object should be auto-updated.
func shouldUpdateSpec(accessor metav1.Object) bool {
value, _ := accessor.GetAnnotations()[flowcontrolv1.AutoUpdateAnnotationKey]
value := accessor.GetAnnotations()[flowcontrolv1.AutoUpdateAnnotationKey]
if autoUpdate, err := strconv.ParseBool(value); err == nil {
return autoUpdate
}