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

Allow additional CIDRs to be excluded from SNAT #520

Commits on Jul 4, 2019

  1. Allow additional CIDRs to be excluded from SNAT

    Introduces a mechanism to provide an exclusion list of CIDRs that should
    not be SNATed.
    
    Adds an environment variable `AWS_VPC_K8S_CNI_EXCLUDE_SNAT_CIDRS` to
    provide a comma separated list of ipv4 CIDRs to exclude from SNAT.
    The value of this environment variable will only be use when
    `AWS_VPC_K8S_CNI_EXTERNALSNAT` is false.
    
    The SNAT exclusion CIDRs will be used to:
    - Generate `iptable` rules to prevent SNATing for packets directed to
    the excluded CIDRs
    - Generate `ip rule` entries to route packets directed to the excluded
    CIDRs through the pod's `eni`. These configuration is done both at the
    `cni` plugin level via the `rpc_handler`, and the runtime `network` api.
    
    Given that the list of excluded CIDRs may vary by configuration it was
    necessary to include a mechanism to clean up stale SNAT rules. If a
    CIDR is removed from the exclusion list, the corresponding `iptable`
    rule will be removed as well, and the chain will be adjusted.
    
    Connects aws#469
    
    Co-authored-by: @rewiko
    Co-authored-by: @yorg1st
    totahuanocotl committed Jul 4, 2019
    Configuration menu
    Copy the full SHA
    b30f2ba View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2019

  1. Configuration menu
    Copy the full SHA
    773c7cb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    783dfcb View commit details
    Browse the repository at this point in the history
  3. Add formatting targets to Makefile

    `format` applies formatting to the project's go files.
    `check-format` checks that no files require formatting; if they do it
    will fail the command.
    
    It adds the `check-format` target to the travis build so that CI fails
    if files are not properly formatted.
    totahuanocotl committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    5355b90 View commit details
    Browse the repository at this point in the history