Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
ref(install): Log namespace for existing mesh
Browse files Browse the repository at this point in the history
Signed-off-by: Kalya Subramanian <[email protected]>
  • Loading branch information
ksubrmnn committed Jul 23, 2021
1 parent 34d4b6d commit 8ef2e8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (i *installCmd) validateOptions() error {
return err
}
if len(osmControllerDeployments.Items) != 0 {
return errMeshAlreadyExists(i.meshName)
return errMeshAlreadyExists(i.meshName, osmControllerDeployments.Items[0].Namespace)
}

// ensure no osm-controller is running in the same namespace
Expand Down Expand Up @@ -268,12 +268,12 @@ func isValidMeshName(meshName string) error {
return nil
}

func errMeshAlreadyExists(name string) error {
return errors.Errorf("Mesh %s already exists in cluster. Please specify a new mesh name using --mesh-name", name)
func errMeshAlreadyExists(name string, namespace string) error {
return errors.Errorf("Mesh %s already exists in namespace %s. Please specify a new mesh name using --mesh-name and install the mesh in a different namespace using --osm-namespace", name, namespace)
}

func errNamespaceAlreadyHasController(namespace string) error {
return annotateErrorMessageWithOsmNamespace("Namespace [%s] already has an osm controller.", namespace)
return annotateErrorMessageWithOsmNamespace("Namespace [%s] already has an osm controller. Please specify a different namespace using --osm-namespace", namespace)
}

// parses Helm strvals line and merges into a map
Expand Down

0 comments on commit 8ef2e8b

Please sign in to comment.