Repository: helm/helm (go)

Issue:
Helm repo_name naming conventions
Helm allows you to add a repo with the following naming conventions

`helm repo add hub/library https://hub/chartrepo/library`

It works fine with the search option

`helm search repo hub/library`

However when pulling down images, it fails
```
~> helm pull hub/library/elasticsearch
Error: chart "library/elasticsearch" matching not found in hub index (try 'helm repo update'): no chart found
```

This is because helm can't allow differentiate between repo_name and chart. However In that case it should avoid having the repo_name created with `/` in the first place itself.


Pull request description:
add legal repo name check
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/main/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:

FIX The issue "Helm repo_name naming conventions" #10460, check repo name if contains "/"

closes #10460

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains documentation
- [*] this PR contains unit tests
- [ ] this PR has been tested for backwards compatibility


Patch:
diff --git a/OWNERS b/OWNERS
index db09856af..93880eb2e 100644
--- a/OWNERS
+++ b/OWNERS
@@ -5,6 +5,7 @@ maintainers:
   - jdolitsky
   - marckhouzam
   - mattfarina
+  - prydonius
   - scottrigby
   - SlickNik
   - technosophos
@@ -17,7 +18,6 @@ emeritus:
   - michelleN
   - migmartri
   - nebril
-  - prydonius
   - rimusz
   - seh
   - thomastaylor312
diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go
index 8844174be..4ddf013c5 100644
--- a/cmd/helm/repo_add.go
+++ b/cmd/helm/repo_add.go
@@ -177,6 +177,11 @@ func (o *repoAddOptions) run(out io.Writer) error {
 		InsecureSkipTLSverify: o.insecureSkipTLSverify,
 	}
 
+	// Check if the repo name is legal
+	if strings.Contains(o.name, "/") {
+		return errors.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name)
+	}
+
 	// If the repo exists do one of two things:
 	// 1. If the configuration for the name is the same continue without error
 	// 2. When the config is different require --force-update


Test patch:
diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go
index c88479ea1..dabfb2a88 100644
--- a/cmd/helm/repo_add_test.go
+++ b/cmd/helm/repo_add_test.go
@@ -131,6 +131,39 @@ func TestRepoAdd(t *testing.T) {
 	}
 }
 
+func TestRepoAddCheckLegalName(t *testing.T) {
+	ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*")
+	if err != nil {
+		t.Fatal(err)
+	}
+	defer ts.Stop()
+	defer resetEnv()()
+
+	const testRepoName = "test-hub/test-name"
+
+	rootDir := ensure.TempDir(t)
+	repoFile := filepath.Join(ensure.TempDir(t), "repositories.yaml")
+
+	o := &repoAddOptions{
+		name:               testRepoName,
+		url:                ts.URL(),
+		forceUpdate:        false,
+		deprecatedNoUpdate: true,
+		repoFile:           repoFile,
+	}
+	os.Setenv(xdg.CacheHomeEnvVar, rootDir)
+
+	wantErrorMsg := fmt.Sprintf("repository name (%s) contains '/', please specify a different name without '/'", testRepoName)
+
+	if err := o.run(ioutil.Discard); err != nil {
+		if wantErrorMsg != err.Error() {
+			t.Fatalf("Actual error %s, not equal to expected error %s", err, wantErrorMsg)
+		}
+	} else {
+		t.Fatalf("expect reported an error.")
+	}
+}
+
 func TestRepoAddConcurrentGoRoutines(t *testing.T) {
 	const testName = "test-name"
 	repoFile := filepath.Join(ensure.TempDir(t), "repositories.yaml")