kubernetes-sigs / lws

LeaderWorkerSet: An API for deploying a group of pods as a unit of replication
Apache License 2.0
142 stars 27 forks source link

Naming convention of lws statefulsets #236

Open liurupeng opened 1 month ago

liurupeng commented 1 month ago

What happened: If a user deployed multiple lws objects in the same cluster with names like: lws; lws-1; lws-2; then the "lws" object will create sts lws-1 as the worker sts; but "lws-1" lws object will create sts lws-1 as the leader sts. What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

  1. Create a LWS object with name "lws" with size 4 and replicas 3;
  2. Create a LWS object with name "lws-1 with size 4 and replicas 3"
  3. Verify that pods count is incorrect

Anything else we need to know?:

Environment:

kannon92 commented 1 month ago

What is your suggestion for this issue?

liurupeng commented 4 weeks ago

I think this would be tricky to fix, I haven't thought through it yet