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

[gardenlet] Switch NetworkPolicy controller to controller-runtime #6991

Conversation

oliver-goetz
Copy link
Member

How to categorize this PR?

/area dev-productivity scalability
/kind enhancement

What this PR does / why we need it:
This PR refactors NetworkPolicy controller to controller-runtime.

Additionally, the reconciler now compares the entire spec of the NetworkPolicy instead of egress rules only to determine if something changed.

Which issue(s) this PR fixes:
Part of #4251

Special notes for your reviewer:
Generally, we want to follow this cookbook while refactoring existing controllers:

  1. Add documentation
  2. Add integration test based on envtest (if not already present)
  3. Switch controller to controller-runtime

Release note:

None

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 11, 2022
@shafeeqes shafeeqes self-assigned this Nov 11, 2022
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/controller.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/add.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/add.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/add.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/add.go Outdated Show resolved Hide resolved
@gardener-prow gardener-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 11, 2022
@oliver-goetz oliver-goetz force-pushed the enh/network-policy-controller-refactoring branch from 6eccd03 to baa938f Compare November 14, 2022 08:51
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/add.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/add_test.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/add_test.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/networkpolicy/reconciler.go Outdated Show resolved Hide resolved
@oliver-goetz oliver-goetz force-pushed the enh/network-policy-controller-refactoring branch from 3115c30 to 29d613f Compare November 15, 2022 00:10
Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

No further comments, thanks @oliver-goetz
/approve
@shafeeqes anything else from your end?

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Nov 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfranzke

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2022
Copy link
Contributor

@shafeeqes shafeeqes left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2022
@gardener-prow gardener-prow bot merged commit 0f08132 into gardener:master Nov 15, 2022
@oliver-goetz oliver-goetz deleted the enh/network-policy-controller-refactoring branch November 15, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants