mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Add validation
This commit is contained in:
parent
3f1b120eda
commit
88c0ad0b6a
1 changed files with 4 additions and 0 deletions
|
|
@ -109,6 +109,10 @@ func (cmd *PrometheusAdapter) makeProvider(promClient prom.Client, stopCh <-chan
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
if cmd.MetricsMaxAge < cmd.MetricsRelistInterval {
|
||||
return nil, fmt.Errorf("max age must not be less than relist interval")
|
||||
}
|
||||
|
||||
// grab the mapper and dynamic client
|
||||
mapper, err := cmd.RESTMapper()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue