mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: add single tailnet support to moons (#8587)
This commit is contained in:
@ -199,7 +199,7 @@ func New(options *Options) *API {
|
||||
options.Authorizer,
|
||||
options.Logger.Named("authz_querier"),
|
||||
)
|
||||
experiments := initExperiments(
|
||||
experiments := ReadExperiments(
|
||||
options.Logger, options.DeploymentValues.Experiments.Value(),
|
||||
)
|
||||
if options.AppHostname != "" && options.AppHostnameRegex == nil || options.AppHostname == "" && options.AppHostnameRegex != nil {
|
||||
@ -370,7 +370,9 @@ func New(options *Options) *API {
|
||||
options.Logger,
|
||||
options.DERPServer,
|
||||
options.DERPMap,
|
||||
&api.TailnetCoordinator,
|
||||
func(context.Context) (tailnet.MultiAgentConn, error) {
|
||||
return (*api.TailnetCoordinator.Load()).ServeMultiAgent(uuid.New()), nil
|
||||
},
|
||||
wsconncache.New(api._dialWorkspaceAgentTailnet, 0),
|
||||
)
|
||||
if err != nil {
|
||||
@ -1081,7 +1083,7 @@ func (api *API) CreateInMemoryProvisionerDaemon(ctx context.Context, debounce ti
|
||||
}
|
||||
|
||||
// nolint:revive
|
||||
func initExperiments(log slog.Logger, raw []string) codersdk.Experiments {
|
||||
func ReadExperiments(log slog.Logger, raw []string) codersdk.Experiments {
|
||||
exps := make([]codersdk.Experiment, 0, len(raw))
|
||||
for _, v := range raw {
|
||||
switch v {
|
||||
|
Reference in New Issue
Block a user