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

Make the agent mutate on update as well as create #565

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

RothAndrew
Copy link
Contributor

Description

Make the Zarf Agent mutate objects on update as well as create

Related Issue

Fixes #564

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist before merging

  • Tests have been added/updated as necessary (add the needs-tests label)
  • Documentation has been updated as necessary (add the needs-docs label)
  • An ADR has been written as necessary (add the needs-adr label) [ 1 2 3 ]
  • (Optional) Changes have been linted locally with golangci-lint. (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.)

@RothAndrew RothAndrew requested a review from jeff-mccoy June 27, 2022 20:41
@RothAndrew RothAndrew self-assigned this Jun 27, 2022
@RothAndrew
Copy link
Contributor Author

I have no idea whether this is the only change that is needed to fix #564. My expertise in the area of mutating webhooks is very limited.

@jeff-mccoy
Copy link
Contributor

It looks like a reasonable change, I debated doing both CREATE/UPDATE but didn't consider how Flux might treat things on update. We'll also need to manage a new zarf agent release for this, but will conflict with a new release for #562. Unfortunately the way we release right now you have to manually trigger a pipeline build and then reference that in zarf.

@jeff-mccoy
Copy link
Contributor

Think we'll also have to double-check that we are maintaining idempotent changes for this as well

@RothAndrew
Copy link
Contributor Author

Do we need a new version of the agent? This is a change to the kubernetes Yamil manifest in the in it package

@jeff-mccoy
Copy link
Contributor

Yeah sorry just saw that, this should be fine as-is, thanks

@jeff-mccoy jeff-mccoy merged commit 3705bdf into master Jun 27, 2022
@jeff-mccoy jeff-mccoy deleted the feature/agent-should-mutate-on-update-too branch June 27, 2022 22:46
@RothAndrew
Copy link
Contributor Author

Thanks! Are you planning on cutting a release with this change? It would help with my DI2-ME work.

@jeff-mccoy
Copy link
Contributor

Yeah, cutting tonight, will be a patch.

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.

The Zarf Agent mutating webhook mutates objects on CREATE only, not UPDATE
2 participants