From ecb820748896793789467e4cd2e516c3e26c976a Mon Sep 17 00:00:00 2001 From: mathetake Date: Mon, 2 Mar 2020 22:26:37 +0900 Subject: [PATCH] pkg/metrics/provider: fix a type in cloudwatch permission name in comments --- docs/gitbook/usage/metrics.md | 2 +- pkg/metrics/providers/cloudwatch.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/gitbook/usage/metrics.md b/docs/gitbook/usage/metrics.md index fa469a9b..512a76c2 100644 --- a/docs/gitbook/usage/metrics.md +++ b/docs/gitbook/usage/metrics.md @@ -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. diff --git a/pkg/metrics/providers/cloudwatch.go b/pkg/metrics/providers/cloudwatch.go index f5c3acbd..700bef3f 100644 --- a/pkg/metrics/providers/cloudwatch.go +++ b/pkg/metrics/providers/cloudwatch.go @@ -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{