Skip to content

feat: refactor member agent flag handling logic + add per-flag validation logic#489

Open
michaelawyu wants to merge 4 commits intokubefleet-dev:mainfrom
michaelawyu:refactor/member-agent-cli-args
Open

feat: refactor member agent flag handling logic + add per-flag validation logic#489
michaelawyu wants to merge 4 commits intokubefleet-dev:mainfrom
michaelawyu:refactor/member-agent-cli-args

Conversation

@michaelawyu
Copy link
Member

Description of your changes

This PR refactors the flag handling logic on the hub agent end and adds per-flag validation logic.

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

N/A

Special notes for your reviewer

N/A

Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
@michaelawyu
Copy link
Member Author

This PR follows the same pattern as applied in PR #459.

@michaelawyu
Copy link
Member Author

UTs and cross-field validation logic are stripped away to control the PR size.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!


# Copy the go source
COPY cmd/memberagent/main.go main.go
COPY cmd/memberagent cmd/memberagent/
Copy link
Member

Choose a reason for hiding this comment

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

is there any reason for this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi Ryan! This is needed as previously we copy only the main.go file for the member agent; however, right now a new folder cmd/memberagent/options is added in the same pattern as the hub agent, and we need to copy this as well otherwise things won't build.

Comment on lines +41 to +42
UseV1Alpha1APIs bool
UseV1Beta1APIs bool
Copy link
Member

Choose a reason for hiding this comment

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

where are those still used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi Ryan! The v1beta1 API flag is still in use in the upstream chart; PR #502 will drop it. I saw that the v1alpha1 API flag has been removed everywhere -> will remove it from the code.

Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants