@@ -15,17 +15,18 @@ const (
1515)
1616
1717type Config struct {
18- Debug bool `mapstructure:"debug"`
19- AgentTokenSecret string `mapstructure:"agent-token-secret" validate:"required"`
20- BuildkiteToken string `mapstructure:"buildkite-token" validate:"required"`
21- Image string `mapstructure:"image" validate:"required"`
22- JobTTL time.Duration `mapstructure:"job-ttl"`
23- MaxInFlight int `mapstructure:"max-in-flight" validate:"min=0"`
24- Namespace string `mapstructure:"namespace" validate:"required"`
25- Org string `mapstructure:"org" validate:"required"`
26- Tags stringSlice `mapstructure:"tags" validate:"min=1"`
27- ProfilerAddress string `mapstructure:"profiler-address" validate:"omitempty,hostname_port"`
28- ClusterUUID string `mapstructure:"cluster-uuid" validate:"omitempty"`
18+ Debug bool `mapstructure:"debug"`
19+ AgentTokenSecret string `mapstructure:"agent-token-secret" validate:"required"`
20+ BuildkiteToken string `mapstructure:"buildkite-token" validate:"required"`
21+ Image string `mapstructure:"image" validate:"required"`
22+ JobTTL time.Duration `mapstructure:"job-ttl"`
23+ MaxInFlight int `mapstructure:"max-in-flight" validate:"min=0"`
24+ Namespace string `mapstructure:"namespace" validate:"required"`
25+ Org string `mapstructure:"org" validate:"required"`
26+ Tags stringSlice `mapstructure:"tags" validate:"min=1"`
27+ ProfilerAddress string `mapstructure:"profiler-address" validate:"omitempty,hostname_port"`
28+ ClusterUUID string `mapstructure:"cluster-uuid" validate:"omitempty"`
29+ AdditionalRedactedVars stringSlice `mapstructure:"additional-redacted-vars" validate:"omitempty"`
2930}
3031
3132type stringSlice []string
@@ -47,5 +48,8 @@ func (c Config) MarshalLogObject(enc zapcore.ObjectEncoder) error {
4748 enc .AddString ("org" , c .Org )
4849 enc .AddString ("profiler-address" , c .ProfilerAddress )
4950 enc .AddString ("cluster-uuid" , c .ClusterUUID )
51+ if err := enc .AddArray ("additional-redacted-vars" , c .AdditionalRedactedVars ); err != nil {
52+ return err
53+ }
5054 return enc .AddArray ("tags" , c .Tags )
5155}
0 commit comments