Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Commit a961dd8

Browse files
author
knrt10
committed
Expose CNI MTU on the baremetal platform
Add docs for baremetal Closes: #976
1 parent d9fe3c1 commit a961dd8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/configuration-reference/platforms/baremetal.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ cluster "bare-metal" {
7676
"testlabel" = ""
7777
}
7878
79+
network_mtu = 1480
80+
7981
controller_domains = var.controller_domains
8082
8183
controller_macs = var.controller_macs
@@ -143,13 +145,14 @@ os_version = var.custom_default_os_version
143145
| `matchbox_client_key_path` | Path to the server TLS key file. | - | string | true |
144146
| `matchbox_endpoint` | Matchbox API endpoint. | - | string | true |
145147
| `matchbox_http_endpoint` | Matchbox HTTP read-only endpoint. Example: "http://matchbox.example.com:8080" | - | string | true |
148+
| `network_mtu` | CNI interface MTU | 1480 | number | false |
146149
| `worker_names` | Ordered list of worker names. Example: ["node2", "node3"] | - | list(string) | true |
147150
| `worker_macs` | Ordered list of worker identifying MAC addresses. Example ["52:54:00:b2:2f:86", "52:54:00:c3:61:77"] | - | list(string) | true |
148151
| `worker_domains` | Ordered list of worker FQDNs. Example ["node2.example.com", "node3.example.com"] | - | list(string) | true |
149152
| `ssh_pubkeys` | List of SSH public keys for user `core`. Each element must be specified in a valid OpenSSH public key format, as defined in RFC 4253 Section 6.6, e.g. "ssh-rsa AAAAB3N...". | - | list(string) | true |
150153
| `os_version` | Flatcar Container Linux version to install. Version such as "2303.3.1" or "current". | "current" | string | false |
151154
| `os_channel` | Flatcar Container Linux channel to install from ("flatcar-stable", "flatcar-beta", "flatcar-alpha", "flatcar-edge"). | "flatcar-stable" | string | false |
152-
| `enable_tls_bootstrap` | Enable TLS bootstraping for Kubelet. | true | bool | false |
155+
| `enable_tls_bootstrap` | Enable TLS bootstraping for Kubelet. | true | bool | false |
153156
| `oidc` | OIDC configuration block. | - | object | false |
154157
| `oidc.issuer_url` | URL of the provider which allows the API server to discover public signing keys. Only URLs which use the https:// scheme are accepted. | - | string | false |
155158
| `oidc.client_id` | A client id that all tokens must be issued for. | "gangway" | string | false |

pkg/platform/baremetal/baremetal.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type config struct {
4545
MatchboxClientKeyPath string `hcl:"matchbox_client_key_path"`
4646
MatchboxEndpoint string `hcl:"matchbox_endpoint"`
4747
MatchboxHTTPEndpoint string `hcl:"matchbox_http_endpoint"`
48+
NetworkMTU int `hcl:"network_mtu,optional"`
4849
OSChannel string `hcl:"os_channel,optional"`
4950
OSVersion string `hcl:"os_version,optional"`
5051
SSHPubKeys []string `hcl:"ssh_pubkeys"`

pkg/platform/baremetal/template.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ module "bare-metal-{{.ClusterName}}" {
4444
worker_macs = {{.WorkerMacs}}
4545
worker_domains = {{.WorkerDomains}}
4646
47+
{{- if .Config.NetworkMTU }}
48+
network_mtu = {{.Config.NetworkMTU}}
49+
{{- end }}
50+
4751
{{- if .KubeAPIServerExtraFlags }}
4852
kube_apiserver_extra_flags = [
4953
{{- range .KubeAPIServerExtraFlags }}

0 commit comments

Comments
 (0)