feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
15
vendor/helm.sh/helm/v3/pkg/chart/metadata.go
vendored
15
vendor/helm.sh/helm/v3/pkg/chart/metadata.go
vendored
@@ -16,6 +16,7 @@ limitations under the License.
|
||||
package chart
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
@@ -110,6 +111,11 @@ func (md *Metadata) Validate() error {
|
||||
if md.Name == "" {
|
||||
return ValidationError("chart.metadata.name is required")
|
||||
}
|
||||
|
||||
if md.Name != filepath.Base(md.Name) {
|
||||
return ValidationErrorf("chart.metadata.name %q is invalid", md.Name)
|
||||
}
|
||||
|
||||
if md.Version == "" {
|
||||
return ValidationError("chart.metadata.version is required")
|
||||
}
|
||||
@@ -128,10 +134,19 @@ func (md *Metadata) Validate() error {
|
||||
|
||||
// Aliases need to be validated here to make sure that the alias name does
|
||||
// not contain any illegal characters.
|
||||
dependencies := map[string]*Dependency{}
|
||||
for _, dependency := range md.Dependencies {
|
||||
if err := dependency.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
key := dependency.Name
|
||||
if dependency.Alias != "" {
|
||||
key = dependency.Alias
|
||||
}
|
||||
if dependencies[key] != nil {
|
||||
return ValidationErrorf("more than one dependency with name or alias %q", key)
|
||||
}
|
||||
dependencies[key] = dependency
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user