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

Add MTU Configuration as a Variable for Proxmox Kubernetes SDN Integration #106

Merged
merged 3 commits into from
Dec 31, 2024

Conversation

Mawiguk0
Copy link

Overview

This Pull Request introduces a new feature to the Proxmox Kubernetes project, allowing users to configure the MTU (Maximum Transmission Unit) value dynamically. This enhancement is crucial for environments utilizing the Software Defined Networking (SDN) feature in Proxmox, as SDN setups often require customized MTU settings to ensure proper network performance and compatibility.

Context and Motivation

Previously, users had to either manually modify the MTU setting on nodes or exclude it from automated configuration (e.g., via ignores). While functional, this approach was not aligned with the project's goal of providing an automated and seamless Kubernetes setup on Proxmox. By integrating MTU configuration directly into the project's variables, users can now handle this requirement more efficiently, reducing manual intervention and potential misconfigurations.

Changes Introduced

  1. New Variable for MTU Configuration

    • Added a variable (internatl_net_mtu) to the configuration file to allow users to specify their desired MTU value.
    • Default value ensures backward compatibility for setups not requiring specific MTU adjustments, if its not set terraform will default to null and therefor ignore the whole mtu setting in the module
  2. Automation of MTU Configuration

    • The internal_net_mtu setting is applied automatically during node provisioning and configuration, eliminating the need for manual MTU adjustments.
    • In the downstream module for the nodes the variable vm_net_mtu is used, which also defaults to null
  3. Documentation Updates

    • Updated the project documentation to include details about the new internal_net_mtu variable, its purpose, and how to use it effectively.

Key Benefits

  • Enhanced Automation: Simplifies deployment in SDN environments by automating MTU settings.
  • Flexibility: Users can easily adapt their configurations to match network requirements.
  • Improved Usability: Reduces reliance on manual interventions, making the setup process more streamlined.

Implementation Details

  • The internal_net_mtu variable is integrated into the relevant module
  • The module also includes default values for future PRs that might want to touch mtu
  • Validation is included to ensure the MTU value provided is within acceptable ranges.

Testing

  • Tested on a Proxmox cluster 8.2.7 with SDN enabled and varying MTU requirements.
  • Verified that:
    • Default behavior remains unchanged for non-SDN setups.
    • User-defined MTU values are correctly applied during configuration.

Backward Compatibility

This change maintains full compatibility with existing setups. If the mtu is not specified, the project defaults to using standard MTU settings of the hypervisor/bridge.

Related Issues

  • Resolves potential issues with Proxmox SDN setups where default MTU settings might cause networking problems.

Notes for Reviewers

Please review the changes for any edge cases in non-SDN environments and verify the documentation's clarity regarding the mtu variable usage.


Related Links

@Mawiguk0 Mawiguk0 marked this pull request as ready for review November 27, 2024 10:46
@Mawiguk0 Mawiguk0 requested a review from khanh-ph as a code owner November 27, 2024 10:46
@JohnnyVicious
Copy link

Tested, works for SDN design (f.e. MTU=1 EVPN)
Can be merged @khanh-ph

@khanh-ph khanh-ph force-pushed the add-variable-for-mtu branch from 3b5b0dc to b9347b2 Compare December 31, 2024 13:04
@khanh-ph khanh-ph merged commit a2d5abb into khanh-ph:develop Dec 31, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants