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

Refactor nncp controller #732

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

rhrazdil
Copy link
Collaborator

Is this a BUG FIX or a FEATURE ?:

Uncomment only one, leave it on its own line:

/kind bug
/kind enhancement

What this PR does / why we need it:
The first thing that reader is presumably interested in when opening
nodenetworkconfigurationpolicy_controller.go file is the Reconcile loop.
In this PR, I'm moving the Reconcile loop to the top of the file,
and reordering the helper functions so that the reader can see the
details in the same order in which these helper functions are called in Reconcile.

Additionally, an unused method enactmentsCountByPolicy is removed.

Special notes for your reviewer:

Release note:

NONE

Radim Hrazdil added 2 commits April 27, 2021 14:57
The first thing that reader is presumably interested in when opening
nodenetworkconfigurationpolicy_controller.go file is the Reconcile loop.
In this commit, I'm moving the Reconcile loop to the top of the file,
and reordering the helper functions so that the reader can see the
details in the same order in which these helper functions are called in
Reconcile.

Signed-off-by: Radim Hrazdil <[email protected]>
enactmentsCountByPolicy is not used, let's remove it.

Signed-off-by: Radim Hrazdil <[email protected]>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/enhancement dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/L labels Apr 27, 2021
@kubevirt-bot kubevirt-bot requested review from qinqon and RamLavi April 27, 2021 13:36
@qinqon
Copy link
Member

qinqon commented Apr 29, 2021

/lgtm
/approve
Thanks!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2021
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2021
@qinqon
Copy link
Member

qinqon commented Apr 29, 2021

/retest

@kubevirt-bot kubevirt-bot merged commit 9fa5fe0 into nmstate:master Apr 29, 2021
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/enhancement lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants