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

Rollouts trigger a double rollout for Flux managed workloads #921

Open
hamishforbes opened this issue Sep 16, 2024 · 0 comments
Open

Rollouts trigger a double rollout for Flux managed workloads #921

hamishforbes opened this issue Sep 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hamishforbes
Copy link

Is your feature request related to a problem? Please describe.
If a workload (e.g. Deployment or StatefulSet) is deployed into a cluster via Flux, then setting the restartedAt annotation will trigger a second rollout at some point in the future when Flux reconciles the configuration.

This is also a problem if you use kubectl (or any other tooling) to trigger a rollout or otherwise modify the deployment template.
The solution is to configure the field manager as flux-client-side-apply when setting the annotation.

Describe the solution you'd like
Make the Field Manager configurable when applying the rollout restart annotation.

I'm not sure where this would be configured ideally, I can see 3 options at least
a) As a config flag/env var on the operator pod itself
b) A field in the CRD e.g. spec.rolloutRestartTargets[{ kind: 'Deployment', name: 'foobar', fieldManager: 'flux-client-side-apply'}]
c) An annotation on the target workload - vso.secrets.hashicorp.com/fieldManager: 'flux-client-side-apply'

I've tested this works by just hardcoding the field manager and deploying the custom operator to a dev environment

@hamishforbes hamishforbes added the enhancement New feature or request label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant