cloudfoundry / silk-release

Silk - CNI plugin BOSH release for Cloud Foundry
Apache License 2.0
11 stars 32 forks source link

Feature: An operator can provide a list of non-contiguous CIDRs for the overlay network #144

Open ameowlia opened 1 month ago

ameowlia commented 1 month ago

Proposed Change

As a CF operator I want to provide multiple smaller cidrs for my overlay network instead of one big cidr So that I don't have to find a huge amount of contiguous IPs to give to CF

Current Property

  network:
     description: "CIDR address block for overlay network.  Subnets for each diego cell are allocated out of this network."
     default: "10.255.0.0/16"

Desired Property

  network:
    description: | 
       A single CIDR address block or an array of CIDR address blocks for overlay network.  
       Subnets for each diego cell are allocated out of this network. CIDR address blocks must
       be the same size or larger than the subnet_prefix_length property.
    default: [ "10.255.0.0/16" ]

Acceptance criteria

Validations

Acceptance

Valid Examples

network: [ "10.255.0.0/16" ]
network: [ "10.255.0.0/25", "10.255.60.0/25", "10.255.128.0/25" ]
network: "10.255.0.0/16"
network: "10.255.10.0/16"

Invalid Examples

# breaks the rule "must be array OR a single CIDR (backward compatible)"
network: "10.255.0.0/21,10.255.64.0/18,10.255.128.0/17"

# breaks the rule "must be valid CIDRs"
network: meow
network: ["meow"]
network: "10.300.0.0/21"
network: [ "10.255.0.0/50" ]

# breaks the rule "must be non-overlapping CIDRs"
network: [ "10.255.0.0/16", "10.255.10.0/16" ]

# breaks the rule "CIDRs must be the same size or larger than the subnet_prefix_length property"
network: [ "10.255.0.0/16", "10.250.10.10/32" ]

Related links

No response

ameowlia commented 3 weeks ago

Work is being done here: https://github.com/cloudfoundry/silk-release/commits/multiple-network-overlay-cidrs/