Giter Site home page Giter Site logo

Comments (9)

andrew-farries avatar andrew-farries commented on September 13, 2024 1

Unfortunately, in the system I'm working with the creation/deletion of these deployments is highly dynamic, so this initial double rollout probably isn't going to work for us.

Thanks for your help on this 👍

from wave.

wonderhoss avatar wonderhoss commented on September 13, 2024

Could you please share the contents of your deployent.yaml?

The behaviour you observe is expected if the Deployment and any of the ConfigMap or Secrets it consumes are updated at the same time. Could that be happening here?

from wave.

andrew-farries avatar andrew-farries commented on September 13, 2024

The content of deployment.yaml is in the issue (expand the Deployment manifest section).

The deployment is not actually referencing any Configmaps or Secrets - merely adding the wave annotation to the deployment is enough to trigger this strange behaviour.

from wave.

wonderhoss avatar wonderhoss commented on September 13, 2024

I think I see now.
This should only happen the first time the wave.pusher.com/update-on-config-change: "true" annotation is added.
In that case it is expected.
Adding the annotation causes a new ReplicaSet to be created (this is the case for any modification made to a Deployment.
Now with the annotation present, wave will take over managing the Deployment and add its own annotation containing a hash of the current configuration. This is used to track any changes to this configuration going forward.

In your case, the Deployment does not actually reference any config objects, so this is somewhat meaningless. If it did consume a ConfigMap, for example, any change to its contents would then cause wave to update the hash annotation and thus trigger a rollout.

The additional Pods being created if wave is enabled on a Deployment that already exists should not cause any problems and is unavoidable.

from wave.

andrew-farries avatar andrew-farries commented on September 13, 2024

Thanks for your quick responses on this.

It's good to know that what I'm seeing is expected, but I'm not sure I agree that this behaviour is harmless, at least for my use case.

I'm working with deployments of 1 replica, where each replica is stateful database and can be very resource heavy in terms of memory and CPU requests. Scheduling an extra pod, even for a short time is probably not acceptable in that case. That's before factoring in the chance that both pods land on the same node and race/overwrite each other on the same PVC at startup resulting in neither of them being able to start successfully.

If this behaviour is unavoidable, I guess I'll have to look elsewhere for a solution for rolling these pods in response to secret mount changes.

from wave.

wonderhoss avatar wonderhoss commented on September 13, 2024

This certainly is one of the challenges of running large, stateful workloads on Kubernetes.

The way wave is designed, the behaviour you have observed is sadly indeed not avoidable.

That said, it won't occur in steady-state but only when a Deployment is first created or the wave annotation first added.
After that initial double rollout, you should expect to see exactly one per config change, although I appreciate that may not be good enough for your use case.

from wave.

sherifabdlnaby avatar sherifabdlnaby commented on September 13, 2024

@gargath What if Wave added its hash annotation only after the first time a secret/configmap is updated?

from wave.

github-actions avatar github-actions commented on September 13, 2024

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.

from wave.

jabdoa2 avatar jabdoa2 commented on September 13, 2024

For anyone interested: This has now been fixed. With Wave 0.6+ you can enable webhook which eleminate an additional short-lived replica in almost any case.

from wave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.