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 nodelifecycle controller #1746

Merged

Conversation

rambohe-ch
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature

What this PR does / why we need it:

As we discussed in the community meeting, nodelifecycle controller will be managed in yurt-manager controller and disabled in kube-controller-manager in order to manage pods eviction easily.

and the following two features are included in this pr:

  1. add nodelifecycle controller
  2. don't mark pods not ready when node has pod binding annotation

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@JameKeal
Copy link
Member

Hi rambohe-ch, I review this code for a long time, it seems that have no problems, but for insurance reasons, shall we organize a code review meeting, from you to show us the detail of the code, it can improve the quality of code.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #1746 (83263d4) into master (7c1198a) will increase coverage by 1.35%.
The diff coverage is 67.49%.

@@            Coverage Diff             @@
##           master    #1746      +/-   ##
==========================================
+ Coverage   50.80%   52.15%   +1.35%     
==========================================
  Files         165      172       +7     
  Lines       19258    20876    +1618     
==========================================
+ Hits         9784    10888    +1104     
- Misses       8555     9025     +470     
- Partials      919      963      +44     
Flag Coverage Δ
unittests 52.15% <67.49%> (+1.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/util/taints/taints.go 100.00% <100.00%> (ø)
...kg/yurtmanager/controller/nodelifecycle/metrics.go 100.00% <100.00%> (ø)
pkg/yurtmanager/webhook/node/v1/node_handler.go 0.00% <ø> (ø)
...r/controller/csrapprover/csrapprover_controller.go 26.84% <0.00%> (ø)
.../daemonpodupdater/daemon_pod_updater_controller.go 29.80% <0.00%> (ø)
...manager/controller/nodepool/nodepool_controller.go 46.73% <0.00%> (ø)
...yurtmanager/controller/raven/dns/dns_controller.go 30.06% <0.00%> (ø)
...rnalservice/gateway_internal_service_controller.go 48.14% <0.00%> (ø)
...r/raven/gatewaypickup/gateway_pickup_controller.go 24.89% <0.00%> (ø)
...publicservice/gateway_public_service_controller.go 39.14% <0.00%> (ø)
... and 13 more

... and 3 files with indirect coverage changes

@rambohe-ch
Copy link
Member Author

Hi rambohe-ch, I review this code for a long time, it seems that have no problems, but for insurance reasons, shall we organize a code review meeting, from you to show us the detail of the code, it can improve the quality of code.

@JameKeal Thanks for your suggestion. I think maybe it's a good idea to introduce this pull request in a community meeting.

2. don't mark pods not ready when node has pod binding annotation
@sonarcloud
Copy link

sonarcloud bot commented Oct 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 30 Code Smells

No Coverage information No Coverage information
1.1% 1.1% Duplication

Copy link
Member

@YTGhost YTGhost left a comment

Choose a reason for hiding this comment

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

/lgtm

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, YTGhost

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

@JameKeal
Copy link
Member

/lgtm

@openyurt-bot
Copy link
Collaborator

@JameKeal: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rambohe-ch rambohe-ch merged commit 4e1eba8 into openyurtio:master Oct 26, 2023
15 checks passed
@rambohe-ch
Copy link
Member Author

Fixes #1713

@crazytaxii
Copy link
Contributor

Should we disable node lifecycle controller in kube-controller-manager in OpenYurt v1.4?

@rambohe-ch
Copy link
Member Author

Should we disable node lifecycle controller in kube-controller-manager in OpenYurt v1.4?

@crazytaxii yes, we need to disable the nodelifecycle controller in kube-controller-manager component. and the tip has been added in the OpenYurt setup tutorial. the link is here: https://openyurt.io/docs/installation/manually-setup#2-prerequisites-for-installing-the-openyurt-control-plane

To adapt to the complex network scenarios at the edge, we need to disable the original node lifecycle management controller of the k8s. For details, see Kube-Controller-Manager Installation Configuration Adjustments.

@jeffrey4l
Copy link

based on our test, seems there is no need to remove the node lifecycle controller from kube-controller-manager.
But how it works ? @rambohe-ch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants