structs: prevent service-defaults upstream configs from using wildcard names or namespaces (#10475)
This commit is contained in:
parent
dd2bf56b1d
commit
952df8b491
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
structs: prevent service-defaults upstream configs from using wildcard names or namespaces
|
||||
```
|
|
@ -789,6 +789,12 @@ func (cfg UpstreamConfig) validate(named bool) error {
|
|||
if cfg.Name == "" {
|
||||
return fmt.Errorf("Name is required")
|
||||
}
|
||||
if cfg.Name == WildcardSpecifier {
|
||||
return fmt.Errorf("Wildcard name is not supported")
|
||||
}
|
||||
if cfg.EnterpriseMeta.NamespaceOrDefault() == WildcardSpecifier {
|
||||
return fmt.Errorf("Wildcard namespace is not supported")
|
||||
}
|
||||
} else {
|
||||
if cfg.Name != "" {
|
||||
return fmt.Errorf("Name must be empty")
|
||||
|
|
Loading…
Reference in New Issue