Replies: 2 comments 2 replies
-
The common hack for this is to use Kustomize config generators and make the URL of the backend used by the worker a kustomize parameter. You would need to modify your worker to automatically update its config or using something like Reloader |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, Ah okay i think i understand, but to confirm. Seems simple enough. flowchart LR;
Rollout -->|Changes config map with image ref| ConfigMap
Reloader <-->|Watches for change| ConfigMap
Reloader -->|Updates deployments image spec with image ref|Deployment
Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey,
So we have a situation where we have a crd defining a rollout which runs some a backend server for a rails application with HA so X replica,
Which if any fail (or the pod fails to boot) it will rollback to the last working version
and then we have another (currently deployment) that uses the same docker image to run a background worker with a single replica which talks to the same database as the above, reason we dont want X replica for this is we just wont require the additional workers
The Question we have is there a way to have this single replica deployment keep in sync with the image being used by the rollout?
I could not see any way to pull this off via Deployment crd logic, so the closest i could think would be to make the worker into a rollout also and trigger the same set of analysisTemplates.
This would probably work for the most part, but
Basically the issue we are trying to avoid surrounds that both use the same codebase specifically for the sake of its database operations
the obvious solution is just add this as another container in the current rollout for the workers context, but we think this would be overkill in terms of its workload
if this is not a thing yet, would it be a matter of making a new feature request to do something like being able to ask one rollout to use another rollouts analysis results like
though i'm sure its not as simple and just delegating the responsibility to something else
If there is some other way to go about this or we have gone down the wrong rabbit hole i would appreciate the 2 cents
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions