2021-11-16 12:04:01 -06:00
|
|
|
//go:build !consulent
|
2020-01-24 10:04:58 -05:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package structs
|
|
|
|
|
2020-06-25 13:58:29 -06:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/hashicorp/go-multierror"
|
2022-03-12 19:55:53 -08:00
|
|
|
|
|
|
|
"github.com/hashicorp/consul/acl"
|
2020-06-25 13:58:29 -06:00
|
|
|
)
|
|
|
|
|
2020-01-24 10:04:58 -05:00
|
|
|
func (e *ProxyConfigEntry) validateEnterpriseMeta() error {
|
|
|
|
return nil
|
|
|
|
}
|
2020-06-25 13:58:29 -06:00
|
|
|
|
|
|
|
func validateUnusedKeys(unused []string) error {
|
|
|
|
var err error
|
|
|
|
|
|
|
|
for _, k := range unused {
|
|
|
|
switch {
|
|
|
|
case k == "CreateIndex" || k == "ModifyIndex":
|
2021-04-29 15:54:27 -04:00
|
|
|
case k == "kind" || k == "Kind":
|
|
|
|
// The kind field is used to determine the target, but doesn't need
|
|
|
|
// to exist on the target.
|
2020-06-25 13:58:29 -06:00
|
|
|
case strings.HasSuffix(strings.ToLower(k), "namespace"):
|
|
|
|
err = multierror.Append(err, fmt.Errorf("invalid config key %q, namespaces are a consul enterprise feature", k))
|
|
|
|
default:
|
|
|
|
err = multierror.Append(err, fmt.Errorf("invalid config key %q", k))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
2021-06-23 16:44:10 -05:00
|
|
|
|
2022-03-12 19:55:53 -08:00
|
|
|
func validateInnerEnterpriseMeta(_, _ *acl.EnterpriseMeta) error {
|
2021-06-23 16:44:10 -05:00
|
|
|
return nil
|
|
|
|
}
|
2021-11-29 11:21:33 -07:00
|
|
|
|
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 17:34:40 -05:00
|
|
|
func validateExportedServicesName(name string) error {
|
|
|
|
if name != "default" {
|
|
|
|
return fmt.Errorf(`exported-services Name must be "default"`)
|
|
|
|
}
|
|
|
|
return nil
|
2021-11-29 11:21:33 -07:00
|
|
|
}
|