mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
use an AND to define the allocator readiness
This commit is contained in:
parent
fed0517fba
commit
967ad95b53
@ -257,10 +257,10 @@ func (c *MetaAllocator) syncAllocators() error {
|
|||||||
if c.ipFamily != api.IPFamily(convertToV1IPFamily(netutils.IPFamilyOfCIDRString(cidr))) {
|
if c.ipFamily != api.IPFamily(convertToV1IPFamily(netutils.IPFamilyOfCIDRString(cidr))) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// the readiness state of an allocator is an OR of all readiness states
|
// the allocator is ready if the object is ready and is not being deleted
|
||||||
ready := true
|
ready := false
|
||||||
if !isReady(serviceCIDR) || !serviceCIDR.DeletionTimestamp.IsZero() {
|
if isReady(serviceCIDR) && serviceCIDR.DeletionTimestamp.IsZero() {
|
||||||
ready = false
|
ready = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if an allocator already exist for this CIDR
|
// check if an allocator already exist for this CIDR
|
||||||
|
Loading…
Reference in New Issue
Block a user