Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Add missing flags to expand config file #492

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/phlare/phlare.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ type Config struct {
MultitenancyEnabled bool `yaml:"multitenancy_enabled,omitempty"`
Analytics usagestats.Config `yaml:"analytics"`

ConfigFile string `yaml:"-"`
ShowVersion bool `yaml:"-"`
ConfigFile string `yaml:"-"`
ShowVersion bool `yaml:"-"`
ConfigExpandEnv bool `yaml:"-"`
}

func newDefaultConfig() *Config {
Expand Down Expand Up @@ -94,6 +95,7 @@ func (c *Config) RegisterFlagsWithContext(ctx context.Context, f *flag.FlagSet)
"The alias 'all' can be used in the list to load a number of core modules and will enable single-binary mode. ")
f.BoolVar(&c.MultitenancyEnabled, "auth.multitenancy-enabled", false, "When set to true, incoming HTTP requests must specify tenant ID in HTTP X-Scope-OrgId header. When set to false, tenant ID anonymous is used instead.")
f.BoolVar(&c.ShowVersion, "version", false, "Show the version of phlare and exit")
f.BoolVar(&c.ConfigExpandEnv, "config.expand-env", false, "Expands ${var} in config according to the values of the environment variables.")

c.registerServerFlagsWithChangedDefaultValues(f)
c.AgentConfig.RegisterFlags(f)
Expand Down