From dffcf6ebbf847635ad77ac2e6f88e418323b24e8 Mon Sep 17 00:00:00 2001 From: Matt Alberts Date: Thu, 25 Apr 2019 12:39:51 -0500 Subject: [PATCH] cmd/contour: adds sds cli Addresses the third high-level design bullet point, support sds in the contour cli for debugging. Updates: #898 Signed-off-by: Matt Alberts --- cmd/contour/cli.go | 1 + cmd/contour/contour.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cmd/contour/cli.go b/cmd/contour/cli.go index 76bd42e1546..0875fedf705 100644 --- a/cmd/contour/cli.go +++ b/cmd/contour/cli.go @@ -29,6 +29,7 @@ const ( clusterType = typePrefix + "Cluster" routeType = typePrefix + "RouteConfiguration" listenerType = typePrefix + "Listener" + secretType = typePrefix + "auth.Secret" ) type Client struct { diff --git a/cmd/contour/contour.go b/cmd/contour/contour.go index 1324f714343..94ab7e176e6 100644 --- a/cmd/contour/contour.go +++ b/cmd/contour/contour.go @@ -76,6 +76,8 @@ func main() { lds.Arg("resources", "LDS resource filter").StringsVar(&resources) rds := cli.Command("rds", "watch routes.") rds.Arg("resources", "RDS resource filter").StringsVar(&resources) + sds := cli.Command("sds", "watch secrets.") + sds.Arg("resources", "SDS resource filter").StringsVar(&resources) serve := app.Command("serve", "Serve xDS API traffic") inCluster := serve.Flag("incluster", "use in cluster configuration.").Bool() @@ -156,6 +158,9 @@ func main() { case rds.FullCommand(): stream := client.RouteStream() watchstream(stream, routeType, resources) + case sds.FullCommand(): + stream := client.RouteStream() + watchstream(stream, secretType, resources) case serve.FullCommand(): log.Infof("args: %v", args) var g workgroup.Group