Skip to content

Commit

Permalink
cmd/contour: adds sds cli
Browse files Browse the repository at this point in the history
Addresses the third high-level design bullet point, support sds in the
contour cli for debugging.

Updates: #898
Signed-off-by: Matt Alberts <malberts@cloudflare.com>
  • Loading branch information
Matt Alberts committed Apr 30, 2019
1 parent d5999a0 commit dffcf6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/contour/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
clusterType = typePrefix + "Cluster"
routeType = typePrefix + "RouteConfiguration"
listenerType = typePrefix + "Listener"
secretType = typePrefix + "auth.Secret"
)

type Client struct {
Expand Down
5 changes: 5 additions & 0 deletions cmd/contour/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dffcf6e

Please sign in to comment.