-
Notifications
You must be signed in to change notification settings - Fork 262
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
Using Refrences Triggers Drift for Gitops reconcilers #2361
Labels
area/resource-references
Issues or PRs related to resource references
kind/bug
Categorizes issue or PR as related to a bug.
Comments
Adding a Flux Diff output
here's a managed fields output
I noticed the diff output has one thing in common, they're both using ack Refrences in nested objects
elbv2 Rule noted in the diff
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/resource-references
Issues or PRs related to resource references
kind/bug
Categorizes issue or PR as related to a bug.
Describe the bug
When using Flux CD, the first apply is successful, and the ECS ACK controller correctly updates references (e.g., taskDefinitionRef and targetGroupRef). However, after Flux performs an SSA (Server side Apply) reconcile, it updates these references back to match the Git repository state. This causes a difference between the current ECS manifest and the Git state, triggering an unnecessary ECS deployment.
I have already tried setting Flux’s
kustomize.toolkit.fluxcd.io/ssa: merge
annotation, but the issue persists.Current Behavior:
Flux reconciles successfully, but an unnecessary redeployment occurs when the AWS ACK controller reconciles. This happens due to the controller’s default reconciliation interval of 10 hours. As a result, ECS tasks are redeployed multiple times per day even when no changes have been made.
Steps to Reproduce:
Added context, I shortened my Flux reconciler to every 5 minutes during debug and it seems like the ecs controller is seeing the changes / diffs but not acting upon them which I think is expected because the ECS reached a healthy state, so the extra deployment seems to occur when ack reconciler kicks in.
also seems to appear with other references like
elbv2.services.k8s.aws/v1alpha1
Rule , when usingtargetGroupRef
so seems to be references in general as it updates the manifestSteps to reproduce
As Flux reconciles, you see this diff
Expected outcome
The controller should either not detect any differences or should properly work with the Flux reconciler to prevent unwanted updates.
The ECS task should not be redeployed unless actual changes have occurred.
Environment
The text was updated successfully, but these errors were encountered: