Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Add AliasIP range support to flannel #10

Merged
merged 4 commits into from
Mar 19, 2021

Conversation

adamlamar
Copy link

Description

Adds GCE Alias IP support for flannel. The feature is enabled by setting FLANNEL_GCE_NETWORK_USE_ALIAS_IP=true.

The code paths between static route support and alias IP support were separated in RegisterNetwork() to avoid crossing any lines between the two features. Static routes should still work and remain the default.

The bulk of the changes are under backend/gce and only a few hundred lines, but the GCP SDK required a large update in vendor to support the alias IP part of the API.

As mentioned in the code, the following needs to be set in /etc/default/instance_configs.cfg before the installation process:

[NetworkInterfaces]
ip_forwarding = false

and then run systemctl restart google-guest-agent.service. This prevents the google guest agent from installing a conflicting route that will break pod networking.

Todos

  • Tests
  • Documentation
  • Release note

Release Note

None required

Copy link

@knisbet knisbet left a comment

Choose a reason for hiding this comment

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

looks good, just some nitpicks.

backend/gce/api.go Outdated Show resolved Hide resolved
backend/gce/api.go Outdated Show resolved Hide resolved
backend/gce/gce.go Outdated Show resolved Hide resolved
@bernardjkim bernardjkim merged commit c570cc6 into gravitational:master Mar 19, 2021
bernardjkim added a commit to gravitational/gravity that referenced this pull request Mar 22, 2021
bernardjkim added a commit to gravitational/gravity that referenced this pull request Mar 22, 2021
bernardjkim added a commit to gravitational/gravity that referenced this pull request Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants