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

adding ip check for annotatePod in ipamd #2328

Merged
merged 4 commits into from
Mar 29, 2023
Merged

Conversation

jerryhe1999
Copy link
Contributor

What type of PR is this?
bug

Which issue does this PR fix:
#2281

What does this PR do / Why do we need it:
This PR adds a check login in annotatePod() of ipamd.go to make sure when deleting the Pod IP, the IP is the one we are releasing.

Testing done on this change:
New unit test added in ipamd_test.go. Both unit tests and integration tests passed.

Automation added to e2e:
N/A

Will this PR introduce any new dependencies?:
No

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No

Does this change require updates to the CNI daemonset config files to work?:
No

Does this PR introduce any user-facing change?:
No


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

@jerryhe1999 jerryhe1999 requested a review from a team as a code owner March 23, 2023 22:01
@jerryhe1999 jerryhe1999 requested a review from jdn5126 March 23, 2023 22:01
Copy link
Contributor

@jdn5126 jdn5126 left a comment

Choose a reason for hiding this comment

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

Changes are looking good, mostly nits. Before submitting, can you make sure make check-format passes? You can run go fmt on the files you modified to get the formatting fixed.

pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Show resolved Hide resolved
pkg/ipamd/rpc_handler.go Show resolved Hide resolved
pkg/ipamd/rpc_handler.go Outdated Show resolved Hide resolved
@jerryhe1999
Copy link
Contributor Author

@jdn5126 I appreciate your review, will address these nits soon.

@jerryhe1999
Copy link
Contributor Author

@jdn5126 Have updated a new commit, could you have look on it? Thank you!

Copy link
Contributor

@jdn5126 jdn5126 left a comment

Choose a reason for hiding this comment

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

A few last nits, then this looks good to me

pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd_test.go Outdated Show resolved Hide resolved
pkg/ipamd/rpc_handler.go Outdated Show resolved Hide resolved
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