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

Add ipamd changes for sg support #1126

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Aug 8, 2020

Issue #, if available:
Follow up to #1125, will rebase once that PR is merged.

Description of changes:

  • Add the needed tags on the node
  • Read pod labels in aws-node and return the needed values to the CNI binary

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

@mogren mogren marked this pull request as draft August 8, 2020 04:11
@mogren mogren force-pushed the add-ipamd-changes-for-sg-support branch 2 times, most recently from d47f26c to cd5cc93 Compare August 10, 2020 21:48
@mogren mogren changed the title [WIP] Add ipamd changes for sg support Add ipamd changes for sg support Aug 10, 2020
@mogren mogren marked this pull request as ready for review August 10, 2020 22:42
@mogren mogren force-pushed the add-ipamd-changes-for-sg-support branch 4 times, most recently from e3f21ce to d067f21 Compare August 11, 2020 01:08
if err != nil {
if k8serror.IsNotFound(err) {
log.Warn("Send AddNetworkReply: pod not found")
return &rpc.DelNetworkReply{Success: true}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Does CNI takes care if you send empty IP in the response?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if we can't parse the IP returned, we just log a warning and exit. From the del function:

	deletedPodIP := net.ParseIP(r.IPv4Addr)
	if deletedPodIP != nil {
 .
 .
 .
	} else {
		log.Warnf("Container %s did not have a valid IP %s", args.ContainerID, r.IPv4Addr)
	}
	return nil
}

pkg/networkutils/network_test.go Outdated Show resolved Hide resolved
@mogren mogren force-pushed the add-ipamd-changes-for-sg-support branch from d067f21 to 9073605 Compare August 11, 2020 04:36
@mogren
Copy link
Contributor Author

mogren commented Aug 11, 2020

Note: Since the CircleCI tests run in my account, the results do not get reported correctly in the PR:

https://app.circleci.com/pipelines/github/mogren/amazon-vpc-cni-k8s/604/workflows/04c8c4e6-3699-4746-ba75-d624ab5dcde2

@mogren mogren force-pushed the add-ipamd-changes-for-sg-support branch from 9073605 to 9b83dbb Compare August 11, 2020 17:14
@mogren mogren merged commit 555639a into aws:master Aug 11, 2020
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.

2 participants