mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Remove a useless "_" assignment to appease the linter
(This would become an error rather than a warning once we try to move this code to another file.) Also rename an "ok" variable to "exists" since that what it really means.
This commit is contained in:
parent
452fcc5fd6
commit
0779042a6f
@ -168,10 +168,10 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// v1.DeprecatedAnnotationTopologyAwareHints has precedence over v1.AnnotationTopologyMode.
|
// v1.DeprecatedAnnotationTopologyAwareHints has precedence over v1.AnnotationTopologyMode.
|
||||||
var ok bool
|
var exists bool
|
||||||
info.hintsAnnotation, ok = service.Annotations[v1.DeprecatedAnnotationTopologyAwareHints]
|
info.hintsAnnotation, exists = service.Annotations[v1.DeprecatedAnnotationTopologyAwareHints]
|
||||||
if !ok {
|
if !exists {
|
||||||
info.hintsAnnotation, _ = service.Annotations[v1.AnnotationTopologyMode]
|
info.hintsAnnotation = service.Annotations[v1.AnnotationTopologyMode]
|
||||||
}
|
}
|
||||||
|
|
||||||
loadBalancerSourceRanges := make([]string, len(service.Spec.LoadBalancerSourceRanges))
|
loadBalancerSourceRanges := make([]string, len(service.Spec.LoadBalancerSourceRanges))
|
||||||
|
Loading…
Reference in New Issue
Block a user