From b8aa52f4f936e0849fe60d076f311a306a8cb53c Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Thu, 8 Feb 2024 16:55:31 -0500 Subject: [PATCH] (#2112) Ensure CHORIA_SRV_DOMAIN is actually getting used The logic to pull config defaults from an environment variable is only used when a config has a default. This adds empty string default for SRV domain which will trigger the logic to pull a default value also from the CHORIA_SRV_DOMAIN environment variable. --- config/choria.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/choria.go b/config/choria.go index 8bedf0c8..3c3b4d6c 100644 --- a/config/choria.go +++ b/config/choria.go @@ -22,7 +22,7 @@ type ChoriaPluginConfig struct { PuppetDBHost string `confkey:"plugin.choria.puppetdb_host" default:""` // The host hosting your PuppetDB, used by the "choria" discovery plugin PuppetDBPort int `confkey:"plugin.choria.puppetdb_port" default:"8081"` // The port your PuppetDB listens on UseSRVRecords bool `confkey:"plugin.choria.use_srv" default:"true" url:"https://choria.io/docs/deployment/dns/"` // If SRV record lookups should be attempted to find Puppet, PuppetDB, Brokers etc - SRVDomain string `confkey:"plugin.choria.srv_domain" environment:"CHORIA_SRV_DOMAIN" url:"https://choria.io/docs/deployment/dns/"` // The domain to use for SRV records, defaults to the domain the server FQDN is in + SRVDomain string `confkey:"plugin.choria.srv_domain" environment:"CHORIA_SRV_DOMAIN" default:"" url:"https://choria.io/docs/deployment/dns/"` // The domain to use for SRV records, defaults to the domain the server FQDN is in Provision bool `confkey:"plugin.choria.server.provision" default:"false" url:"https://choria-io.github.io/provisioner/"` // Specifically enable or disable provisioning ProvisionAllowUpdate bool `confkey:"plugin.choria.server.provision.allow_update" default:"false" url:"https://choria-io.github.io/provisioner/"` // Allows the provisioner to perform in-place version updates