• Weixu Zhuang's avatar
    Fix TODO in pkg/controller/nodecontroller.go line 472 · 3928bd6e
    Weixu Zhuang authored
    The code now calculates and find out the CIDRs for every node in any sync period.
    I will fix this TODO by maintaining a set for available CIDRs left. Firstly, I will
    insert 256 CIDRs into the available set. Once someone get one CIDR, remove this CIDR
    from the available set. If one node get deleted, we will reinsert the CIDR associates
    with this node back to available CIDR. Once there are nothing left in available CIDR set,
    generate another 256 CIDRs and insert them into the available set. As a result, we do not
    need to generate CIDRs in every monitor process and we only need to assign CIDR to node
    which does not have it.
    
    This commit also fix the error that CIDR may overflow when we use the function
    generateCIDRs. There will be no more ip overflowing, all assigan CIDR will be valid
    3928bd6e
Name
Last commit
Last update
..
doc.go Loading commit data...
nodecontroller.go Loading commit data...
nodecontroller_test.go Loading commit data...
rate_limited_queue.go Loading commit data...
rate_limited_queue_test.go Loading commit data...