Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

WIP: Allow customisation of kubenetwork #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions magnum_capi_helm/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ def _update_helm_release(self, context, cluster, nodegroups=None):

network_id = self._get_fixed_network_id(context, cluster)
subnet_id = neutron.get_fixed_subnet_id(context, cluster.fixed_subnet)
kubenetwork_pod_cidr = "172.16.0.0/13"
kubenetwork_services_cidr = "172.24.0.0/13"

values = {
"kubernetesVersion": kube_version,
Expand Down Expand Up @@ -581,6 +583,18 @@ def _update_helm_release(self, context, cluster, nodegroups=None):
),
},
},
"kubeNetwork": {
"pods": {
"cidrBlocks": [
kubenetwork_pod_cidr,
],
},
"services": {
"cidrBlocks": [
kubenetwork_services_cidr,
],
},
},
"controlPlane": {
"machineFlavor": cluster.master_flavor_id,
"machineCount": cluster.master_count,
Expand Down
36 changes: 36 additions & 0 deletions magnum_capi_helm/tests/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,18 @@ def get_cluster_helm_standard_values(self):
},
"dnsNameservers": ["8.8.1.1"],
},
"kubeNetwork": {
"pods": {
"cidrBlocks": [
"172.16.0.0/13",
],
},
"services": {
"cidrBlocks": [
"172.24.0.0/13",
],
},
},
"apiServer": {
"enableLoadBalancer": True,
"loadBalancerProvider": "amphora",
Expand Down Expand Up @@ -1262,6 +1274,18 @@ def test_create_cluster_boot_volume(
},
"dnsNameservers": ["8.8.1.1"],
},
"kubeNetwork": {
"pods": {
"cidrBlocks": [
"172.16.0.0/13",
],
},
"services": {
"cidrBlocks": [
"172.24.0.0/13",
],
},
},
"apiServer": {
"enableLoadBalancer": True,
"loadBalancerProvider": "amphora",
Expand Down Expand Up @@ -1353,6 +1377,18 @@ def test_create_cluster_boot_volume_extra_network(
},
"dnsNameservers": ["8.8.1.1"],
},
"kubeNetwork": {
"pods": {
"cidrBlocks": [
"172.16.0.0/13",
],
},
"services": {
"cidrBlocks": [
"172.24.0.0/13",
],
},
},
"apiServer": {
"enableLoadBalancer": True,
"loadBalancerProvider": "amphora",
Expand Down
Loading