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

chore: refactor addon controller #7819

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

zhuyi1159
Copy link

@zhuyi1159 zhuyi1159 commented Jul 16, 2024

fix #7678
Currently addon controller is based on state machine, which may not reflect the latest status of the addon and has low readability. This pr is aimed to refactor addon controller with kubebuilderx framework and switch from monitoring the addon.status.phase to monitoring the latest status of the addon job to ensure the timeliness of status updates.

@CLAassistant
Copy link

CLAassistant commented Jul 16, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines. label Jul 16, 2024
@apecloud-bot apecloud-bot added the pre-approve Fork PR Pre Approve Test label Jul 16, 2024
@zhuyi1159 zhuyi1159 changed the title refactor addon controller chore: refactor addon controller Jul 16, 2024
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Jul 17, 2024
@zhuyi1159 zhuyi1159 marked this pull request as ready for review July 17, 2024 06:59
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Jul 18, 2024
@ldming
Copy link
Collaborator

ldming commented Jul 22, 2024

Please explain the reasons for refactoring in the description.

@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Jul 23, 2024
@apecloud-bot apecloud-bot added the pre-approve Fork PR Pre Approve Test label Jul 24, 2024
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 8, 2024
@@ -202,17 +164,23 @@ func (r *AddonReconciler) deleteExternalResources(reqCtx intctrlutil.RequestCtx,
}
job := &batchv1.Job{}
if err := r.Get(reqCtx.Ctx, key, job); err != nil {
fmt.Println("not found: ", jobName)
Copy link
Contributor

Choose a reason for hiding this comment

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

should not use fmt.Println to print log

@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 21, 2024
@zhuyi1159 zhuyi1159 force-pushed the support/refactor-addon-controller branch from 669da4e to 56cd472 Compare August 21, 2024 06:12
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 21, 2024
@zhuyi1159 zhuyi1159 force-pushed the support/refactor-addon-controller branch from abf6178 to f2c0f6d Compare August 22, 2024 07:21
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 22, 2024
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 22, 2024
@zhuyi1159 zhuyi1159 force-pushed the support/refactor-addon-controller branch from 6b0c228 to 21ba3f2 Compare August 22, 2024 10:03
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre-approve Fork PR Pre Approve Test size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] refactor add-on controller to make it more readable
7 participants