Merge branch 'release-1.0'

This commit is contained in:
Fabian Reinartz 2016-07-19 00:51:32 +09:00
commit 42a3cb6172
5 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,4 @@
## 1.0.0-rc.0 / 2016-07-14 ## 1.0.0 / 2016-07-18
* [CHANGE] Remove deprecated query language keywords * [CHANGE] Remove deprecated query language keywords
* [CHANGE] Change Kubernetes SD to require specifying Kubernetes role * [CHANGE] Change Kubernetes SD to require specifying Kubernetes role

View file

@ -1 +1 @@
1.0.0-rc.0 1.0.0

View file

@ -781,7 +781,7 @@ func (c *MarathonSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) erro
// KubernetesSDConfig is the configuration for Kubernetes service discovery. // KubernetesSDConfig is the configuration for Kubernetes service discovery.
type KubernetesSDConfig struct { type KubernetesSDConfig struct {
APIServers []URL `yaml:"api_servers"` APIServers []URL `yaml:"api_servers"`
Role string `yaml:"role"` Role KubernetesRole `yaml:"role"`
InCluster bool `yaml:"in_cluster,omitempty"` InCluster bool `yaml:"in_cluster,omitempty"`
BasicAuth *BasicAuth `yaml:"basic_auth,omitempty"` BasicAuth *BasicAuth `yaml:"basic_auth,omitempty"`
BearerToken string `yaml:"bearer_token,omitempty"` BearerToken string `yaml:"bearer_token,omitempty"`
@ -813,7 +813,7 @@ func (c *KubernetesRole) UnmarshalYAML(unmarshal func(interface{}) error) error
case KubernetesRoleNode, KubernetesRolePod, KubernetesRoleContainer, KubernetesRoleService, KubernetesRoleEndpoint, KubernetesRoleAPIServer: case KubernetesRoleNode, KubernetesRolePod, KubernetesRoleContainer, KubernetesRoleService, KubernetesRoleEndpoint, KubernetesRoleAPIServer:
return nil return nil
default: default:
return fmt.Errorf("Unknown Kubernetes SD role %q", c) return fmt.Errorf("Unknown Kubernetes SD role %q", *c)
} }
} }

View file

@ -385,6 +385,9 @@ var expectedErrors = []struct {
}, { }, {
filename: "kubernetes_bearertoken.bad.yml", filename: "kubernetes_bearertoken.bad.yml",
errMsg: "at most one of bearer_token & bearer_token_file must be configured", errMsg: "at most one of bearer_token & bearer_token_file must be configured",
}, {
filename: "kubernetes_role.bad.yml",
errMsg: "role",
}, { }, {
filename: "kubernetes_bearertoken_basicauth.bad.yml", filename: "kubernetes_bearertoken_basicauth.bad.yml",
errMsg: "at most one of basic_auth, bearer_token & bearer_token_file must be configured", errMsg: "at most one of basic_auth, bearer_token & bearer_token_file must be configured",

View file

@ -0,0 +1,5 @@
scrape_configs:
- kubernetes_sd_configs:
- api_server: kubernetes:443
role: vacation