Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

func PodToPod() in pkg/connectivity/pod-to-pod.go should return error #52

Open
johnsonshi opened this issue Aug 5, 2021 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@johnsonshi
Copy link
Contributor

The function should return an error. Specifically referring to

// PodToPod tests the connectivity between a source and destination pods.
func PodToPod(fromPod *v1.Pod, toPod *v1.Pod) {
log.Info().Msgf("Testing connectivity from %s/%s to %s/%s", fromPod.Namespace, fromPod.Name, toPod.Namespace, toPod.Name)

There are several points in this function where continuing execution would probably not make sense?

client, err := kuberneteshelper.GetKubeClient()
if err != nil {
log.Err(err).Msg("Error creating Kubernetes client")
}

srcConfigGetter, err = envoy.GetEnvoyConfigGetterForPod(fromPod, osmVersion)
if err != nil {
log.Err(err).Msgf("Error creating ConfigGetter for pod %s/%s", fromPod.Namespace, fromPod.Name)
}

dstConfigGetter, err = envoy.GetEnvoyConfigGetterForPod(toPod, osmVersion)
if err != nil {
log.Err(err).Msgf("Error creating ConfigGetter for pod %s/%s", toPod.Namespace, toPod.Name)
}

Creating this issue to kick off discussion about this.

@johnsonshi johnsonshi added the good first issue Good for newcomers label Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant