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

fix(connectivity): return early on fatal errors #108

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/connectivity/pod-to-pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ func PodToPod(srcPod *corev1.Pod, dstPod *corev1.Pod, osmControlPlaneNamespace c
client, err := pod.GetKubeClient()
if err != nil {
log.Error().Err(err).Msg("Error creating Kubernetes client")
return
}

meshInfo, err := utils.GetMeshInfo(client, osmControlPlaneNamespace)
if err != nil {
log.Err(err).Msg("Error getting OSM info")
log.Err(err).Msg("Error getting OSM info. Try running again with the `--osm-namespace` option to specify the osm control plane namespace")
return
}

kubeConfig, err := pod.GetKubeConfig()
if err != nil {
log.Error().Err(err).Msg("Error getting Kubernetes config")
return
}

splitClient, err := smiSplitClient.NewForConfig(kubeConfig)
Expand Down
2 changes: 1 addition & 1 deletion pkg/osm/version/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestEnvoyConfigParser(t *testing.T) {
assert := tassert.New(t)
actual := getReleases()

assert.Equal([]string{"v0.10", "v0.11", "v0.6", "v0.7", "v0.8", "v0.9"}, actual)
assert.Equal([]string{"v0.10", "v0.11", "v0.7", "v0.8", "v0.9"}, actual)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to pass unit tests as v0.6 is not supported anymore.


for _, release := range actual {
controllerVersion := ControllerVersion(release)
Expand Down