Configuration option to tweak SubnetLen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Flannel Charm |
In Progress
|
High
|
Felipe Reyes |
Bug Description
[Impact]
Environments with big machines to run kubernetes-worker or a high number of create/destroy pods will see a starvation of available IP address since a /24 subnet (flannel's default) will be able to have 254 hosts, flannel uses a 24h lease which will make this problem easier to find.
Currently the configuration passed omits the SubnetLen key:
https:/
This should be exposed in a configuration option, and in my opinion the charm should set this to 22 by default since it would allow environments running CI/CD jobs (e.g. gitlab's ci runner) to run without problems.
Using a /22 per worker and a /16 for the cluster would give space to have 64 workers and 1022 IP addresses per worker.
~ $ ipcalc-ng 10.1.0.0/16 --split 22 |grep Network | wc -l
64
~ $ ipcalc-ng 10.1.252.0/22
Network: 10.1.252.0/22
Netmask: 255.255.252.0 = 22
Broadcast: 10.1.255.255
Address space: Private Use
HostMin: 10.1.252.1
HostMax: 10.1.255.254
Hosts/Net: 1022
[Workaround]
This script could be used to set the SubnetLen manully - https:/
tags: | added: sts |
Changed in charm-flannel: | |
assignee: | nobody → Felipe Reyes (freyes) |
Changed in charm-flannel: | |
milestone: | none → 1.28 |
Changed in charm-flannel: | |
milestone: | 1.28 → 1.28+ck1 |
tags: | added: backport-needed |
Changed in charm-flannel: | |
milestone: | 1.28+ck1 → 1.29 |
> This should be exposed in a configuration option, and in my opinion the charm should set this to 22 by default since it would allow environments running CI/CD jobs (e.g. gitlab's ci runner) to run without problems.
Whatever we set the default to, we will need to make sure that it is handled correctly when upgrading existing clusters that already have the default at 24.