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

Update kube-router network policy controller #2867

Merged
merged 4 commits into from
Feb 3, 2021

Conversation

brandond
Copy link
Member

@brandond brandond commented Jan 27, 2021

Proposed Changes

Update network policy controller code to resync with kube-router: v1.0.0-rc2 -> v1.1.1 (master)
cloudnativelabs/kube-router@d6f9f31...ee9f6d8

Types of Changes

bugfix/upstream

Verification

Run normal test suite

Linked Issues

#2876

Further Comments

This update pulls in several bug fixes and a restructuring of the code from upstream. I have attempted to minimize the number of changes to the upstream code in order to make future resyncs easier. This includes modifying our Run wrapper to set up and sync the shared informers similar to how upstream's controller setup does it.

Most of the changes are limited to:

  • Modifying NewNetworkPolicyController function to use the k3s config.Node struct instead of KubeRouter's
    CLI configuration, eliminate use of a WaitGroup for shutdown sequencing, and drop Prometheus metrics support.
  • Relocate or remove module references
  • Switch out glog for klog
  • Fix spelling in comments that our codespell CI plugin barfs on
  • Removing tests that exercise removed code

The updated network policy controller also wants to know about a couple new cluster-level configuration items, such as the cluster service CIDR range and the node-local port range, so those need to be plumbed through.

@erikwilson
Copy link
Contributor

Thanks for updating this!
If possible could we also add the network_policy_controller test?

@brandond brandond force-pushed the update-netpol branch 3 times, most recently from c9cfe56 to 428b2f4 Compare January 28, 2021 23:37
@brandond brandond requested a review from a team as a code owner January 28, 2021 23:43
@brandond brandond marked this pull request as ready for review January 28, 2021 23:43
@brandond brandond changed the title Update kube-router network policy controller code Update kube-router network policy controller Jan 29, 2021
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
…waitgroup stuff

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond
Copy link
Member Author

brandond commented Feb 3, 2021

I'm going to merge this without squashing so that the modifications remain obvious. Still going to work on getting some modularity pushed upstream but until then we should try to make this easier to update ex-situ.

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