Allow Marathon SD without bearer_token and bearer_token_file
This commit is contained in:
parent
47bdcf0f67
commit
04eadf6e20
|
@ -945,9 +945,6 @@ func (c *MarathonSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) erro
|
||||||
if len(c.BearerToken) > 0 && len(c.BearerTokenFile) > 0 {
|
if len(c.BearerToken) > 0 && len(c.BearerTokenFile) > 0 {
|
||||||
return fmt.Errorf("at most one of bearer_token & bearer_token_file must be configured")
|
return fmt.Errorf("at most one of bearer_token & bearer_token_file must be configured")
|
||||||
}
|
}
|
||||||
if len(c.BearerToken) == 0 && len(c.BearerTokenFile) == 0 {
|
|
||||||
return fmt.Errorf("at most one of bearer_token & bearer_token_file must be configured")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue