Managment server is xds management server as well

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-03-04 15:38:29 +01:00
parent f72ecc7423
commit 2d67767764
4 changed files with 116 additions and 83 deletions

View File

@@ -67,7 +67,7 @@ func setup(c *caddy.Controller) error {
func parseTraffic(c *caddy.Controller) (*Traffic, error) {
toHosts := []string{}
t := &Traffic{node: "coredns"}
t := &Traffic{node: "coredns", mgmt: "xds"}
var (
err error
tlsConfig *tls.Config
@@ -98,6 +98,12 @@ func parseTraffic(c *caddy.Controller) (*Traffic, error) {
}
for c.NextBlock() {
switch c.Val() {
case "cluster":
args := c.RemainingArgs()
if len(args) != 1 {
return nil, c.ArgErr()
}
t.mgmt = args[0]
case "id":
args := c.RemainingArgs()
if len(args) != 1 {