Skip to content

Commit

Permalink
Chart: Allow configuring node-cidr-mask-size flag on `kube-controll…
Browse files Browse the repository at this point in the history
…er-manager`. (#336)

Co-authored-by: Mario Nitchev <[email protected]>
  • Loading branch information
Gacko and mnitchev authored Sep 18, 2024
1 parent 85f1447 commit b9d6933
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Chart: Allow to enable `auditd` service through `global.components.auditd.enabled`.
- Chart: Allow configuring `node-cidr-mask-size` flag on `kube-controller-manager`.

## [1.0.0] - 2024-07-24

Expand Down
1 change: 1 addition & 0 deletions helm/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Configuration of connectivity and networking options.
| `global.connectivity.network.pods` | **Pods**|**Type:** `object`<br/>|
| `global.connectivity.network.pods.cidrBlocks` | **Pod subnets**|**Type:** `array`<br/>**Default:** `["100.64.0.0/12"]`|
| `global.connectivity.network.pods.cidrBlocks[*]` | **Pod subnet** - IPv4 address range for pods, in CIDR notation.|**Type:** `string`<br/>**Example:** `"10.244.0.0/16"`<br/>|
| `global.connectivity.network.pods.nodeCidrMaskSize` | **Node CIDR mask size** - The size of the mask that is used for the node CIDR. The node CIDR is a sub-range of the pod CIDR and so the mask size and pod CIDR must be chosen such that there is enough space for the maximum number of nodes in the cluster.|**Type:** `integer`<br/>**Default:** `24`|
| `global.connectivity.network.services` | **Services**|**Type:** `object`<br/>|
| `global.connectivity.network.services.cidrBlocks` | **Kubernetes Service subnets**|**Type:** `array`<br/>**Default:** `["172.31.0.0/16"]`|
| `global.connectivity.network.services.cidrBlocks[*]` | **Service subnet** - IPv4 address range for kubernetes services, in CIDR notation.|**Type:** `string`<br/>**Example:** `"172.31.0.0/16"`<br/>|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: add
path: /spec/containers/0/command/-
value: --node-cidr-mask-size={{ $.Values.global.connectivity.network.pods.nodeCidrMaskSize }}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
permissions: "0644"
encoding: base64
content: {{ tpl ($.Files.Get "files/etc/kubernetes/patches/kube-apiserver0+json.yaml") . | b64enc }}
- path: /etc/kubernetes/patches/kube-controller-manager0+json.yaml
permissions: "0644"
encoding: base64
content: {{ tpl ($.Files.Get "files/etc/kubernetes/patches/kube-controller-manager0+json.yaml") . | b64enc }}
{{- end }}
{{- end }}

Expand Down
8 changes: 8 additions & 0 deletions helm/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,14 @@
],
"maxItems": 1,
"minItems": 1
},
"nodeCidrMaskSize": {
"type": "integer",
"title": "Node CIDR mask size",
"description": "The size of the mask that is used for the node CIDR. The node CIDR is a sub-range of the pod CIDR and so the mask size and pod CIDR must be chosen such that there is enough space for the maximum number of nodes in the cluster.",
"default": 24,
"maximum": 27,
"minimum": 16
}
}
},
Expand Down
1 change: 1 addition & 0 deletions helm/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ global:
pods:
cidrBlocks:
- 100.64.0.0/12
nodeCidrMaskSize: 24
services:
cidrBlocks:
- 172.31.0.0/16
Expand Down

0 comments on commit b9d6933

Please sign in to comment.