Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use eks:cluster-name as clusterId #856

Merged
merged 8 commits into from
Mar 4, 2020

Conversation

groodt
Copy link
Contributor

@groodt groodt commented Feb 28, 2020

Issue #775

Description of changes:
Prioritise eks:cluster-name as clusterId for cni-metrics-helper. This is the tag that EKS node-groups is automatically adding.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

pkg/publisher/publisher.go Show resolved Hide resolved
@groodt groodt requested a review from jaypipes March 3, 2020 08:24
pkg/publisher/publisher.go Show resolved Hide resolved
@@ -207,6 +198,32 @@ func (p *cloudWatchPublisher) getCloudWatchMetricNamespace() *string {
return aws.String(cloudwatchMetricNamespace)
}

func getClusterId(ec2Client *ec2wrapper.EC2Wrapper) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit... could you name this getClusterID() (capitalized ID) please?

@groodt groodt requested a review from jaypipes March 3, 2020 20:06
@groodt
Copy link
Contributor Author

groodt commented Mar 3, 2020

Changes in. PTAL.

Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks Greg!

@groodt
Copy link
Contributor Author

groodt commented Mar 3, 2020

@jaypipes

I just realised that I think the condition should be:

		if err == nil && clusterID != "" {
			break
		}

@groodt
Copy link
Contributor Author

groodt commented Mar 3, 2020

Thanks @jaypipes

Will this get merged by a collaborator automatically at some stage, or do I need to assign somebody specific?

Copy link
Contributor

@mogren mogren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @groodt!

@mogren mogren merged commit 7062392 into aws:master Mar 4, 2020
@mogren mogren mentioned this pull request Mar 19, 2020
4 tasks
mogren pushed a commit to mogren/amazon-vpc-cni-k8s that referenced this pull request Apr 20, 2020
* Use eks:cluster-name as clusterId
mogren pushed a commit that referenced this pull request Apr 20, 2020
* Use eks:cluster-name as clusterId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants