Comments (11)
@qdrddr i think this would need more investigation on if the reason really is ArgoCD. and if it is, should it watch the Env field under deployments. if not, ArgoCD provides ways to ignore specific fields in specific resources
from reloader.
we are also facing the same issue
from reloader.
@qdrddr the way reloader works is by updating env var, which triggers a deployment change and update it sent to the pods. Could there be any case that argocd is actively reverting the changes to the deployment done by reloader, in that case new pods will be deleted and old state will be persisted?
from reloader.
@MuneebAijaz would you recommend how to workaround this and continue using ArgoCD?
from reloader.
Could you point to the documents for this?
Also, I have doubts about the proposed workaround to set ArgoCD to skip checking parts of a resource, as even if ArgoCD ignores Envs, it still will see and kill extra containers with auto-prune settings regardless of changes in Env.
So basically, I cannot use Reloader with ArgoCD with enabled auto pruning. @MuneebAijaz
from reloader.
The problem is that Reloader creates additional containers before killing outdated containers to reduce impact, which is an excellent strategy. But ArgoCD, with enabled Pruning, notices an extra container and kills it before Reloader gets a chance to kill the outdated container. Resulting in the outdated containers remain unchanged.
Do you know if ArgoCD integration is needed here?
Ideas on how this can be fixed:
- So ideally, in this scenario of Reloader creating a new container and then killing the old one and so on, instead, Reloader should tell ArgoCD to increase replicas by one, and then Reloader can kill the old containers one by one. So ArgoCD with enabled Pruning would create a new extra container and re-create those deleted by Reloader.
- Alternatively, you can temporarily turn off auto pruning in ArgoCD for a given app and reload it once the Reloader is complete.
- A not-ideal scenario that might also work is to check if there is more than one container in the replica set without creating an extra container, kill one by one, and wait till they are re-created by ArgoCD & k8s.
from reloader.
I have doubts about the proposed workaround to set ArgoCD
yes, there are implications to that approach. but not the ones stated above.
The problem is that Reloader creates additional containers before killing outdated containers
Reloader doesnt do that, Reloader only updates ENV field in the parent resource (Deployment, Statefulset, Daemonset), and when an ENV is updated, Deployment etc are bound to propagate that change to the pods, so the parent resource spins up another ReplicaSet with new ENV, and Replicaset creates new pod with updated ENV. that is how update is done by Reloader.
Reloader itself doesnt manage pod/container lifecycle, to not have any effect on user's application, it relies on already set deployment strategy in Deployments to propagate that change.
from reloader.
I will try to replicate the issue on my end, and get back to you.
from reloader.
@qdrddr Did you follow #333 ?
I changed from reloadStrategy: annotations
to env-vars
and problem gone.
from reloader.
@0123hoang Nope, the problem persists with reloadStrategy: env-vars
from reloader.
I would debug this by disabling self-heal for the responsible argo app, let reloader do its thing and afterwards check the argo app. My guess is that the application is out of sync and argo is immediately reverting because of that.
from reloader.
Related Issues (20)
- Pipeline sometimes fails at the "Commit Files" step which prevents Release from being created unless manual intervention is done HOT 6
- [ENHANCE]Define memory request and memory limit for reloder-reloader container HOT 4
- [BUG] reload after controller was down does not occur HOT 1
- [BUG] Recent CI authored auto-releases are broken! HOT 11
- [BUG] Image default tag in 1.0.89 set as "vv1.0.89" instead of v1.0.89 HOT 1
- [BUG] GIt modules is using ssh url for theme submodule HOT 5
- namespace selector isn't working @help/Kind HOT 2
- Question: how do I decide between auto, reload, and search/match? HOT 4
- [BUG]- All Pods restart irrespective of liveness check status or rolling update strategy HOT 5
- [BUG] Latest version 1.0.99 isn't available in Helm repo HOT 4
- Race Condition Between Deployment Update and ConfigMap Change HOT 2
- [ENHANCE] Set log level in helm chart HOT 1
- [BUG] Published 1.0.107 chart uses a non-existent container tag HOT 2
- [ENHANCE] Find a different way to release helm charts, instead of commits to master branch HOT 8
- Consider changing release strategy HOT 20
- [ENHANCE] Add a Security Policy on the project and SAST in the CI/CD HOT 1
- [BUG] Helm install fails because of invalid chars in labels when using flux OCI Repository HOT 1
- [BUG] Latest chart has has invalid version numbers HOT 7
- [BUG] `null` doesn't remove default value of `deployment.securityContext.runAsUser` HOT 3
- [BUG] Not all Pods get restartet after Secret Change HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reloader.