Documentation ¶
Index ¶
- func ConfigureStaticIP(staticVIP string) error
- func RemoveStaticIP(staticVIP string) error
- type EgressGateway
- func (d *EgressGateway) AddStaticIptablesRule(routingID string, routingName string, tableName string, sourceIPs []string, ...) error
- func (d *EgressGateway) DeleteStaticIptablesRule(routingID string, routingName string, tableName string, sourceIPs []string, ...) error
- func (d *EgressGateway) Setup() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureStaticIP ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.