mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: add template builder deployment config and telemetry types (#25082)
This commit is contained in:
@@ -645,6 +645,7 @@ type DeploymentValues struct {
|
||||
HideAITasks serpent.Bool `json:"hide_ai_tasks,omitempty" typescript:",notnull"`
|
||||
AI AIConfig `json:"ai,omitempty"`
|
||||
StatsCollection StatsCollectionConfig `json:"stats_collection,omitempty" typescript:",notnull"`
|
||||
TemplateBuilder TemplateBuilderConfig `json:"template_builder,omitempty"`
|
||||
|
||||
Config serpent.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
|
||||
WriteConfig serpent.Bool `json:"write_config,omitempty" typescript:",notnull"`
|
||||
@@ -1462,6 +1463,10 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
|
||||
Description: "Configure data retention policies for various database tables. Retention policies automatically purge old data to reduce database size and improve performance. Setting a retention duration to 0 disables automatic purging for that data type.",
|
||||
YAML: "retention",
|
||||
}
|
||||
deploymentGroupTemplateBuilder = serpent.Group{
|
||||
Name: "Template Builder",
|
||||
YAML: "templateBuilder",
|
||||
}
|
||||
)
|
||||
|
||||
httpAddress := serpent.Option{
|
||||
@@ -4059,6 +4064,25 @@ Write out the current server config as YAML to stdout.`,
|
||||
// used externally.
|
||||
Hidden: true,
|
||||
},
|
||||
{
|
||||
Name: "Disable Template Builder",
|
||||
Description: "Disable the template builder feature for guided template creation. When disabled, all /api/v2/templatebuilder/* endpoints return 404.",
|
||||
Flag: "disable-template-builder",
|
||||
Env: "CODER_DISABLE_TEMPLATE_BUILDER",
|
||||
Value: &c.TemplateBuilder.Disabled,
|
||||
Group: &deploymentGroupTemplateBuilder,
|
||||
YAML: "disabled",
|
||||
},
|
||||
{
|
||||
Name: "Template Builder Registry URL",
|
||||
Description: "The base URL of the module registry used by the template builder for module source paths.",
|
||||
Flag: "template-builder-registry-url",
|
||||
Env: "CODER_TEMPLATE_BUILDER_REGISTRY_URL",
|
||||
Value: &c.TemplateBuilder.RegistryURL,
|
||||
Default: "https://registry.coder.com",
|
||||
Group: &deploymentGroupTemplateBuilder,
|
||||
YAML: "registryURL",
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
@@ -4168,6 +4192,11 @@ type AIConfig struct {
|
||||
Chat ChatConfig `json:"chat,omitempty" typescript:",notnull"`
|
||||
}
|
||||
|
||||
type TemplateBuilderConfig struct {
|
||||
Disabled serpent.Bool `json:"disabled,omitempty"`
|
||||
RegistryURL serpent.String `json:"registry_url,omitempty"`
|
||||
}
|
||||
|
||||
type SupportConfig struct {
|
||||
Links serpent.Struct[[]LinkConfig] `json:"links" typescript:",notnull"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user