mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
config: rename role 'endpoint' to 'endpoints'
This commit is contained in:
parent
ce45040e47
commit
1b6dfa32a9
|
@ -799,7 +799,7 @@ const (
|
||||||
KubernetesRoleNode = "node"
|
KubernetesRoleNode = "node"
|
||||||
KubernetesRolePod = "pod"
|
KubernetesRolePod = "pod"
|
||||||
KubernetesRoleService = "service"
|
KubernetesRoleService = "service"
|
||||||
KubernetesRoleEndpoint = "endpoint"
|
KubernetesRoleEndpoint = "endpoints"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *KubernetesRole) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
func (c *KubernetesRole) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
|
@ -839,7 +839,7 @@ func (c *KubernetesSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) er
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if c.Role == "" {
|
if c.Role == "" {
|
||||||
return fmt.Errorf("role missing (one of: pod, service, endpoint, node)")
|
return fmt.Errorf("role missing (one of: pod, service, endpoints, node)")
|
||||||
}
|
}
|
||||||
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")
|
||||||
|
|
2
config/testdata/conf.good.yml
vendored
2
config/testdata/conf.good.yml
vendored
|
@ -115,7 +115,7 @@ scrape_configs:
|
||||||
- job_name: service-kubernetes
|
- job_name: service-kubernetes
|
||||||
|
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: endpoint
|
- role: endpoints
|
||||||
api_server: 'https://localhost:1234'
|
api_server: 'https://localhost:1234'
|
||||||
|
|
||||||
basic_auth:
|
basic_auth:
|
||||||
|
|
Loading…
Reference in a new issue