gateway

package
v0.0.0-...-8f056b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureStaticIP

func ConfigureStaticIP(staticVIP string) error

ConfigureStaticIP adds a secondary IP to an interface, Example: staticVIP=192.168.56.199/24

Get the route for this staticVIP
Find Interface with that route,
Verify interface has IP in same network as staticVIP
If found configure staticVIP on that interface.

func RemoveStaticIP

func RemoveStaticIP(staticVIP string) error

Types

type EgressGateway

type EgressGateway struct {
	// contains filtered or unexported fields
}

EgressGateway configures the gateway node (based on the `staticegressip` CRD object) with SNAT rules to NAT egress traffic from the pods that need a static egress IP

func NewEgressGateway

func NewEgressGateway() (*EgressGateway, error)

NewEgressGateway is a constructor for EgressGateway interface

func (*EgressGateway) AddStaticIptablesRule

func (d *EgressGateway) AddStaticIptablesRule(routingID string, routingName string, tableName string, sourceIPs []string, destinationIP, egressIP string) error

AddStaticIptablesRule adds iptables rule for SNAT, creates source and destination IPsets. IPs can then be dynamically added to these IPsets.

func (*EgressGateway) DeleteStaticIptablesRule

func (d *EgressGateway) DeleteStaticIptablesRule(routingID string, routingName string, tableName string, sourceIPs []string, destinationIP string, egressIP string) error

DeleteStaticIptablesRule clears IPtables rules added by AddStaticIptablesRule

func (*EgressGateway) Setup

func (d *EgressGateway) Setup() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL