Skip to content

🐛 fix(CLI/test): Preserve namespaced scope on edit - #5756

Open
afzal442 wants to merge 1 commit into
kubernetes-sigs:masterfrom
afzal442:fix/kubebuilder-edit
Open

🐛 fix(CLI/test): Preserve namespaced scope on edit#5756
afzal442 wants to merge 1 commit into
kubernetes-sigs:masterfrom
afzal442:fix/kubebuilder-edit

Conversation

@afzal442

Copy link
Copy Markdown
Member

When running edit --multigroup or edit --license, the scaffold should not inadvertently clear the namespaced scope.

This change adds tests to ensure that the namespaced setting in the project configuration is preserved when these flags are used, and that the RBAC Role is not overwritten with a ClusterRole.

Fixes: #5752

When running `edit --multigroup` or `edit --license`, the scaffold should not inadvertently clear the namespaced scope.

This change adds tests to ensure that the `namespaced` setting in the project configuration is preserved when these flags are used, and that the RBAC Role is not overwritten with a ClusterRole.
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: afzal442
Once this PR has been reviewed and has the lgtm label, please assign varshaprasad96 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 11, 2026
})
})

// PreScaffold -> Scaffold

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have only tests here
So, the bug does not occur?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Could you plz elaborate on that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The title describe that the changes here fix a bug.
However you ONLY added new tests, so how the bug is fixed?
Have we not the bug?

@afzal442
afzal442 requested a review from camilamacedo86 June 26, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(go/v4) kubebuilder edit silently reverts a namespaced project to cluster-scoped when --namespaced is omitted

3 participants