mirror of https://github.com/status-im/consul.git
structs: prevent service-defaults upstream configs from using wildcard names or namespaces (#10475)
This commit is contained in:
parent
8db2865e86
commit
8344b7fe2e
|
@ -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