Add disable-indexing

This commit is contained in:
Jeff Mitchell 2018-10-23 15:03:17 -04:00
parent 98d38981d1
commit a979f49cd7
3 changed files with 17 additions and 0 deletions

View File

@ -528,6 +528,7 @@ func (c *ServerCommand) Run(args []string) int {
EnableRaw: config.EnableRawEndpoint,
DisableSealWrap: config.DisableSealWrap,
DisablePerformanceStandby: config.DisablePerformanceStandby,
DisableIndexing: config.DisableIndexing,
AllLoggers: allLoggers,
}
if c.flagDev {

View File

@ -69,6 +69,9 @@ type Config struct {
DisableSealWrap bool `hcl:"-"`
DisableSealWrapRaw interface{} `hcl:"disable_sealwrap"`
DisableIndexing bool `hcl:"-"`
DisableIndexing interface{} `hcl:"disable_indexing"`
}
// DevConfig is a Config that is used for dev mode of Vault.
@ -347,6 +350,11 @@ func (c *Config) Merge(c2 *Config) *Config {
result.DisableSealWrap = c2.DisableSealWrap
}
result.DisableIndexing = c.DisableIndexing
if c2.DisableIndexing {
result.DisableIndexing = c2.DisableIndexing
}
return result
}
@ -452,6 +460,12 @@ func ParseConfig(d string, logger log.Logger) (*Config, error) {
}
}
if result.DisableIndexing != nil {
if result.DisableIndexing, err = parseutil.ParseBool(result.DisableIndexing); err != nil {
return nil, err
}
}
list, ok := obj.Node.(*ast.ObjectList)
if !ok {
return nil, fmt.Errorf("error parsing: file doesn't contain a root object")

View File

@ -459,6 +459,7 @@ type CoreConfig struct {
DevLicenseDuration time.Duration
DisablePerformanceStandby bool
DisableIndexing bool
AllLoggers []log.Logger
}
@ -491,6 +492,7 @@ func (c *CoreConfig) Clone() *CoreConfig {
LicensingConfig: c.LicensingConfig,
DevLicenseDuration: c.DevLicenseDuration,
DisablePerformanceStandby: c.DisablePerformanceStandby,
DisableIndexing: c.DisableIndexing,
AllLoggers: c.AllLoggers,
}
}