Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifying MTU settings in ConfigMap #1770

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

ketkulka
Copy link
Contributor

@ketkulka ketkulka commented Mar 18, 2018

  • Have a single point of MTU definition
  • CNI_MTU variable will set mtu for cni as well as
    FELIX_IPINIPMTU
  • For more control, both var can still be set individually

Description

Fixes Issue #1482

Todos

  • Tests
  • Documentation
  • Release note

Release note

veth MTU is now configurable via the configmap in the Kubernetes self-hosted manifests

@ketkulka ketkulka changed the title Issue #1482: Unifying MTU settings in ConfigMap Unifying MTU settings in ConfigMap Mar 19, 2018
Copy link
Member

@caseydavenport caseydavenport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments, thanks!

@@ -21,6 +21,9 @@ data:
# Configure the Calico backend to use.
calico_backend: "bird"

# Configure the MTU to use
cni_mtu: "1500"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we just want to call this "mtu" or perhaps "veth_mtu" since it's used by both CNI and Felix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we should default to the lowest common denominator - from this page it looks like that's 1440.

It would also be great to update the command above with a link for more information.

e.g.:
"# Configure the MTU to use for container veths. See here for more information: https://docs.projectcalico.org/v3.0/usage/configuration/mtu"

common network MTU size. The default MTU for the IP-in-IP tunnel device
is 1440 to match the value needed in GCE.
common network MTU size. Moreover, the default MTU for the IP-in-IP tunnel
device is also set to 1500. For GCE deployments, `FELIX_IPINIPMTU` should
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to leave this at 1440 - that's going to work in the most environments by default. For other environments, users can adjust as desired.

@@ -83,6 +84,9 @@ Example CNI configuration
}
```

By default, CNI configuration mtu is set to 1500 by virtue of `"mtu": __CNI_MTU__` variable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right - the __CNI_MTU__ variable only affects the CNI plugin. However, the "mtu" option in the ConfigMap is passed to both the CNI plugin and Felix as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caseydavenport thanks for your time for review. I have pushed the change taking care of these comments.

Copy link
Contributor Author

@ketkulka ketkulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caseydavenport thanks for your time for review. I have pushed the change taking care of these comments.

@ketkulka
Copy link
Contributor Author

@caseydavenport squashed the commits here too.

@@ -83,6 +83,9 @@ Example CNI configuration
}
```

By default, CNI MTU and `FELIX_IPINIPMTU` derive their value from `veth_mtu` ConfigMap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a bit that says "If using a Kubernetes self-hosted manifest to install Calico, ... "

This section isn't kubernetes specific, so by adding Kubernetes specific data we need to make that clear. To be honest, we probably don't need this section at all - I think the comments in the manifests themselves should make this clear. wdyt?

common network MTU size. The default MTU for the IP-in-IP tunnel device
is 1440 to match the value needed in GCE.
common network MTU size. The default MTU for the IP-in-IP tunnel device
-is 1440 to match the value needed in GCE.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a typo? I don't think we should have a - here.

- Have a single point of MTU definition
- veth_mtu configmap variable will set mtu for cni as well as
  FELIX_IPINIPMTU
- For more control, both var can still be set individually
@ketkulka
Copy link
Contributor Author

ketkulka commented Mar 29, 2018 via email

@caseydavenport
Copy link
Member

@ketkulka no worries, thanks for running with this!

@caseydavenport caseydavenport added the release-note-required Change has user-facing impact (no matter how small) label Mar 29, 2018
@caseydavenport caseydavenport merged commit 6d88a15 into projectcalico:master Mar 29, 2018
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Aug 15, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Aug 15, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/typhoon that referenced this pull request Aug 15, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Aug 15, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/typhoon that referenced this pull request Aug 15, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Aug 25, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/typhoon that referenced this pull request Aug 25, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/typhoon that referenced this pull request Aug 25, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Aug 26, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
tegamckinney pushed a commit to flexdrive/terraform-render-bootkube that referenced this pull request Dec 4, 2018
* Most upstream changes were buried in calico#1884 which
switched from non-templated manifests to templating
* projectcalico/calico#1884
* projectcalico/calico#1853
* projectcalico/calico#2069
* projectcalico/calico#2032
* projectcalico/calico#1841
* projectcalico/calico#1770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants