spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.52k stars 363 forks source link

Update client.go #481

Closed jiuker closed 2 years ago

jiuker commented 2 years ago

When replica is 1 or zero, this resource can be created without. There is no point in creating it. When replica is 0, the original logic creates a resource with min -1. This is something that K8s would reject if it could actually be committed.

Fixes # .

Changes proposed on the PR:

jiuker commented 2 years ago

review again. @ese

ese commented 2 years ago

Thanks