pkg/metrics/provider: fix a type in cloudwatch permission name in comments

This commit is contained in:
mathetake
2020-03-02 22:26:55 +09:00
parent 5faf63ed24
commit ecb8207488
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -315,4 +315,4 @@ Reference the template in the canary analysis:
interval: 1m
```
Please note that the flagger need AWS IAM permission to perform `cloudwatch:GetMetricsData` to use this provider.
Please note that the flagger need AWS IAM permission to perform `cloudwatch:GetMetricData` to use this provider.
+3 -3
View File
@@ -54,7 +54,7 @@ func NewCloudWatchProvider(metricInterval string, provider flaggerv1.MetricTempl
}, err
}
// RunQuery executes the aws cloud watch metrics query against GetMetricsData endpoint
// RunQuery executes the aws cloud watch metrics query against GetMetricData endpoint
// and returns the the first result as float64
func (p *CloudWatchProvider) RunQuery(query string) (float64, error) {
var cq []*cloudwatch.MetricDataQuery
@@ -88,9 +88,9 @@ func (p *CloudWatchProvider) RunQuery(query string) (float64, error) {
return aws.Float64Value(vs[0]), nil
}
// IsOnline calls GetMetricsData endpoint with the empty query
// IsOnline calls GetMetricData endpoint with the empty query
// and returns an error if the returned status code is NOT http.StatusBadRequests.
// For example, if the flagger does not have permission to perform `cloudwatch:GetMetricsData`,
// For example, if the flagger does not have permission to perform `cloudwatch:GetMetricData`,
// the returned status code would be http.StatusForbidden
func (p *CloudWatchProvider) IsOnline() (bool, error) {
_, err := p.client.GetMetricData(&cloudwatch.GetMetricDataInput{