enableSidecar, _ := checkSidecar(client, pod)
enableKmesh := isKmeshManaged(pod)
if !enableSidecar && !enableKmesh {
log.Info("do not need process, pod is not managed by sidecar or kmesh")
return
}
In bypass controller, we check whether sidecar or kmesh enabled for the pod, this is right. But the way it checks sidecar, it ir nor right
If a namespace with injection label, we donot check whether pod has a sidecar anymore. And similarly, we also check pod annotation, without checking sidecar.
This can be mistaken, when the pod is started earlier.
What would you like to be added:
In bypass controller, we check whether sidecar or kmesh enabled for the pod, this is right. But the way it checks sidecar, it ir nor right
If a namespace with injection label, we donot check whether pod has a sidecar anymore. And similarly, we also check pod annotation, without checking sidecar.
This can be mistaken, when the pod is started earlier.
Why is this needed: