Add worker tagging (#862)

This allows workers to have tags assigned to them, which can then be filtered to control which targets they are allowed to serve.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-01-21 16:27:20 -05:00
1 parent 595a86508e
commit 717a3b52ee
54 files changed
+2150 -666

No files matched your search

+15
View File
@@ -305,6 +305,9 @@ type TestControllerOpts struct {
// generated, unless provided in a non-nil Config
Name string
// The suffix to use for initial resources
InitialResourcesSuffix string
// The logger to use, or one will be created
Logger hclog.Logger
}
@@ -383,6 +386,18 @@ func NewTestController(t *testing.T, opts *TestControllerOpts) *TestController {
}
tc.name = opts.Config.Controller.Name
if opts.InitialResourcesSuffix != "" {
suffix := opts.InitialResourcesSuffix
tc.b.DevAuthMethodId = "ampw_" + suffix
tc.b.DevHostCatalogId = "hcst_" + suffix
tc.b.DevHostId = "hst_" + suffix
tc.b.DevHostSetId = "hsst_" + suffix
tc.b.DevOrgId = "o_" + suffix
tc.b.DevProjectId = "p_" + suffix
tc.b.DevTargetId = "ttcp_" + suffix
tc.b.DevUserId = "u_" + suffix
}
// Set up KMSes
switch {
case opts.RootKms != nil && opts.WorkerAuthKms != nil: