Skip to content

Commit

Permalink
(#2112) Ensure CHORIA_SRV_DOMAIN is actually getting used
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
treydock committed Feb 8, 2024
1 parent 745fd37 commit dccf403
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/choria.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (
//
// NOTE: When adding or updating doc strings please run `go generate` in the root of the repository
type ChoriaPluginConfig struct {
PuppetServerHost string `confkey:"plugin.choria.puppetserver_host" default:"puppet"` // The hostname where your Puppet Server can be found
PuppetServerPort int `confkey:"plugin.choria.puppetserver_port" default:"8140"` // The port your Puppet Server listens on
PuppetCAHost string `confkey:"plugin.choria.puppetca_host" default:"puppet"` // The hostname where your Puppet Certificate Authority can be found
PuppetCAPort int `confkey:"plugin.choria.puppetca_port" default:"8140"` // The port your Puppet Certificate Authority listens on
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
PuppetServerHost string `confkey:"plugin.choria.puppetserver_host" default:"puppet"` // The hostname where your Puppet Server can be found
PuppetServerPort int `confkey:"plugin.choria.puppetserver_port" default:"8140"` // The port your Puppet Server listens on
PuppetCAHost string `confkey:"plugin.choria.puppetca_host" default:"puppet"` // The hostname where your Puppet Certificate Authority can be found
PuppetCAPort int `confkey:"plugin.choria.puppetca_port" default:"8140"` // The port your Puppet Certificate Authority listens on
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" 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
Expand Down

0 comments on commit dccf403

Please sign in to comment.