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

Support additional Field Managers in the disallow list #1017

Conversation

Nalum
Copy link
Member

@Nalum Nalum commented Nov 25, 2023

Setup a new flag to pass in the names of managers that should be overwritten in the same way that kubectl changes are.

Closes #982

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

@Nalum please add tests for this, similar to kustomization_force_test.go

@Nalum Nalum requested a review from stefanprodan November 27, 2023 18:30
@Nalum Nalum marked this pull request as ready for review November 27, 2023 18:33
@Nalum Nalum requested a review from stefanprodan November 27, 2023 18:57
@Nalum
Copy link
Member Author

Nalum commented Nov 27, 2023

@stefanprodan would this change be picked up automatically in the docs or should I update them? Assuming I should update them they are located in the flux2 or website repo?

@Nalum Nalum requested a review from stefanprodan November 27, 2023 20:33
@stefanprodan
Copy link
Member

@Nalum please squash into one or two commits and force push. I will make the docs changes in website before the release, there are other changes besides this to the controller global configuration.

@stefanprodan stefanprodan added enhancement New feature or request area/server-side-apply SSA related issues and pull requests labels Nov 27, 2023
…nd build up the disallow list to include these

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Setup new flag to allow overriding additional managers and pass this data to the KustomizationReconciler instance

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update field name to be more specific

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>

Update the remaining fieldManagers vars to match the new definition

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Change AdditionalFieldManagers to DisallowedFieldManagers

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Add unit test to cover the new disallowed field manager change

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Use correct variable in the final Run

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Undo the timeout multiplication

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update internal/controller/kustomization_disallowed_managers_test.go

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>

Check for we're not getting errors on the Patch calls and remove the eventually as not needed here

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update main.go

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>
@Nalum Nalum force-pushed the issue-982-support-additional-field-managers-in-banlist branch from 4db46b2 to 96a7722 Compare November 28, 2023 08:23
@Nalum
Copy link
Member Author

Nalum commented Nov 29, 2023

Think this is good for testing now @stefanprodan 👍

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @Nalum for this great contribution 🏅

@stefanprodan stefanprodan merged commit 84c446a into fluxcd:main Nov 30, 2023
@Nalum Nalum deleted the issue-982-support-additional-field-managers-in-banlist branch November 30, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/server-side-apply SSA related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support additional Field Managers in the disallow list
2 participants