Skip to content

add finalizer when build resource to reduce one patch call to api server#477

Merged
kangclzjc merged 1 commit into
ai-dynamo:mainfrom
kangclzjc:kang_finilizer
Apr 29, 2026
Merged

add finalizer when build resource to reduce one patch call to api server#477
kangclzjc merged 1 commit into
ai-dynamo:mainfrom
kangclzjc:kang_finilizer

Conversation

@kangclzjc

Copy link
Copy Markdown
Contributor

What type of PR is this?

/feature

What this PR does / why we need it:

Add finalizer for pcsg/pclq in advance to reduce one patch and reduce one call to api server. When we have hundreds of thousands of pcsg/pclq, it could reduce much pressure on api server.

Which issue(s) this PR fixes:

Fixes #450

Special notes for your reviewer:

Does this PR introduce a API change?


Additional documentation e.g., enhancement proposals, usage docs, etc.:


@renormalize renormalize left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks!

@kangclzjc

Copy link
Copy Markdown
Contributor Author

We can add a test to add data

@renormalize

Copy link
Copy Markdown
Contributor

@kangclzjc i personally don't think a test is necessary for this change. If the other reviewers think it's necessary then we can try and add a test.

@Ronkahn21 Ronkahn21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM overall but I would want you to add tests for building the objects to make sure we build with finalizer on

@kangclzjc

Copy link
Copy Markdown
Contributor Author

LGTM overall but I would want you to add tests for building the objects to make sure we build with finalizer on

Hi @Ronkahn21 , this PR use the same method which utils provide, I think already have the unit test for

controllerutil.AddFinalizer(pcsg, apiconstants.FinalizerPodCliqueScalingGroup)

@copy-pr-bot

copy-pr-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kangclzjc kangclzjc merged commit 55228d6 into ai-dynamo:main Apr 29, 2026
16 of 22 checks passed
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.

Aggregate create/update actions in one Reconcile action

5 participants