ib-kubernetes
ib-kubernetes copied to clipboard
Change functions/variables to make them aligned with context
Some functions/variables names can confuse what they really do. For ex., in pkg/utils/utils.go:
35 // HasNetworkAttachment check if pod has Network Attachment
36 func HasNetworkAttachment(pod *kapi.Pod) bool {
37 return len(pod.Annotations[v1.NetworkAttachmentAnnot]) > 0
38 }
function actually check network attachment annotations, not network attachment.
@adrianchiris
a pod is associated with a network attachment if it has a network attachment annotation. so im not sure there is an issue here.
can you elaborate on why you think there is an issue ?
Originally, You complained that name of this function a bit confusing.
yea well, i dont remember what was confusing :)
So this should be renamed to: HasNetworkAttachmentAnnot()