config

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	InterfaceConfig
	RoutingConfig
	IPNeighborScanConfig

	StealFirstNIC  bool   `json:"stealFirstNIC,omitempty"`
	StealInterface string `json:"stealInterface,omitempty"`
	STNSocketFile  string `json:"stnSocketFile,omitempty"`
	STNVersion     uint8  `json:"stnVersion,omitempty"`

	NatExternalTraffic           bool `json:"natExternalTraffic,omitempty"`
	EnablePacketTrace            bool `json:"enablePacketTrace,omitempty"`
	CRDNodeConfigurationDisabled bool `json:"crdNodeConfigurationDisabled,omitempty"`

	IPAMConfig IPAMConfig   `json:"ipamConfig"`
	NodeConfig []NodeConfig `json:"nodeConfig"`
}

Config represents configuration for the Contiv agent. The path to the configuration file can be specified in two ways:

  • using the `-contiv-config=<path to config>` argument, or
  • using the `CONTIV_CONFIG=<path to config>` environment variable

type IPAMConfig

type IPAMConfig struct {
	UseExternalIPAM               bool       `json:"useExternalIPAM,omitempty"`
	ContivCIDR                    string     `json:"contivCIDR,omitempty"`
	ServiceCIDR                   string     `json:"serviceCIDR,omitempty"`
	NodeInterconnectDHCP          bool       `json:"nodeInterconnectDHCP,omitempty"`
	PodSubnetCIDR                 string     `json:"podSubnetCIDR,omitempty"`
	PodSubnetOneNodePrefixLen     uint8      `json:"podSubnetOneNodePrefixLen,omitempty"`
	VPPHostSubnetCIDR             string     `json:"vppHostSubnetCIDR,omitempty"`
	VPPHostSubnetOneNodePrefixLen uint8      `json:"vppHostSubnetOneNodePrefixLen,omitempty"`
	NodeInterconnectCIDR          string     `json:"nodeInterconnectCIDR,omitempty"`
	VxlanCIDR                     string     `json:"vxlanCIDR,omitempty"`
	DefaultGateway                string     `json:"defaultGateway,omitempty"`
	SRv6                          SRv6Config `json:"srv6"`
}

IPAMConfig groups IPAM configuration options as basic data types and with JSON tags, ready to be un-marshalled from the configuration. The string fields are then parsed to *net.IPNet and returned as such in IPAMConfig structure.

type IPNeighborScanConfig

type IPNeighborScanConfig struct {
	// when enabled, IP neighbors should be periodically scanned and probed
	// to maintain the ARP table
	ScanIPNeighbors          bool  `json:"scanIPNeighbors,omitempty"`
	IPNeighborScanInterval   uint8 `json:"ipNeighborScanInterval,omitempty"`
	IPNeighborStaleThreshold uint8 `json:"ipNeighborStaleThreshold,omitempty"`
}

IPNeighborScanConfig contains configuration related to IP neighbour scanning.

type InterfaceConfig

type InterfaceConfig struct {
	MTUSize                    uint32 `json:"mtuSize,omitempty"`
	UseTAPInterfaces           bool   `json:"useTAPInterfaces,omitempty"`
	TAPInterfaceVersion        uint8  `json:"tapInterfaceVersion,omitempty"`
	TAPv2RxRingSize            uint16 `json:"tapv2RxRingSize,omitempty"`
	TAPv2TxRingSize            uint16 `json:"tapv2TxRingSize,omitempty"`
	Vmxnet3RxRingSize          uint16 `json:"vmxnet3RxRingSize,omitempty"`
	Vmxnet3TxRingSize          uint16 `json:"vmxnet3TxRingSize,omitempty"`
	InterfaceRxMode            string `json:"interfaceRxMode,omitempty"` // "" == "default" / "polling" / "interrupt" / "adaptive"
	TCPChecksumOffloadDisabled bool   `json:"tcpChecksumOffloadDisabled,omitempty"`
	EnableGSO                  bool   `json:"enableGSO,omitempty"`
}

InterfaceConfig contains configuration related to interfaces.

type NodeConfig

type NodeConfig struct {
	// name of the node, should match with the hostname
	NodeName string `json:"nodeName"`

	// node config specification can be defined either via the configuration file
	// or using CRD
	nodeconfigcrd.NodeConfigSpec
}

NodeConfig represents configuration specific to a given node.

type RoutingConfig

type RoutingConfig struct {
	// VRF IDs
	MainVRFID uint32 `json:"mainVRFID,omitempty"`
	PodVRFID  uint32 `json:"podVRFID,omitempty"`

	// Transportation used for node-to-node communication:
	// 1. VXLAN overlay ("vxlan") encapsulates/decapsulates traffic between nodes using VXLAN.
	// 2. SRv6 overlay ("srv6") encapsulates/decapsulates traffic between nodes using SRv6
	//    (segment routing based on IPv6).
	// SRv6's steering and policy will be on ingress node and SRv6's localsid on egress node. This transportation
	// expects ipv6 to be enabled (SRv6 packets=IPv6 packets using SR header extension).
	// 3. Using none of the previous mentioned overlays ("nooverlay") and route traffic using routing
	//    tables/etc., e.g. if the nodes are on the same L2 network.
	NodeToNodeTransport string `json:"nodeToNodeTransport,omitempty"`

	// Enabled when routing for K8s service should be performed by using SRv6 (segment routing based on IPv6).
	// The routing within the routing segments is done as normal IPv6 routing, therefore IPv6 must be enabled.
	// This setting handles how packet is transported from service client to service backend, but not how is
	// transported response packet(if any) from backend to service client. This is handled by non-service routing
	// that uses on node-to-node part of route the "NodeToNodeTransport" setting. To communicate between nodes
	// only using SRv6, set it to "srv6" (+ UseSRv6ForServices=true).
	UseSRv6ForServices bool `json:"useSRv6ForServices,omitempty"`

	// Enabled when Service Function Chaining for K8s service should be performed by using SRv6 (segment routing
	// based on IPv6).
	UseSRv6ForServiceFunctionChaining bool `json:"useSRv6ForServiceFunctionChaining,omitempty"`

	// Enables usage of DX6 end function instead of DT6 end function for node-to-node communication using SRV6.
	// This is limited to pod-to-pod communication use case in full IPv6 environment (pods and node fabric is IPv6)
	UseDX6ForSrv6NodetoNodeTransport bool `json:"useDX6ForSrv6NodetoNodeTransport,omitempty"`

	// when enabled, cluster IP CIDR should be routed towards VPP from Linux
	RouteServiceCIDRToVPP bool `json:"routeServiceCIDRToVPP,omitempty"`
}

RoutingConfig groups configuration options related to routing.

type SRv6Config

type SRv6Config struct {
	ServicePolicyBSIDSubnetCIDR            string `json:"servicePolicyBSIDSubnetCIDR,omitempty"`
	ServicePodLocalSIDSubnetCIDR           string `json:"servicePodLocalSIDSubnetCIDR,omitempty"`
	ServiceHostLocalSIDSubnetCIDR          string `json:"serviceHostLocalSIDSubnetCIDR,omitempty"`
	ServiceNodeLocalSIDSubnetCIDR          string `json:"serviceNodeLocalSIDSubnetCIDR,omitempty"`
	NodeToNodePodLocalSIDSubnetCIDR        string `json:"nodeToNodePodLocalSIDSubnetCIDR,omitempty"`
	NodeToNodeHostLocalSIDSubnetCIDR       string `json:"nodeToNodeHostLocalSIDSubnetCIDR,omitempty"`
	NodeToNodePodPolicySIDSubnetCIDR       string `json:"nodeToNodePodPolicySIDSubnetCIDR,omitempty"`
	NodeToNodeHostPolicySIDSubnetCIDR      string `json:"nodeToNodeHostPolicySIDSubnetCIDR,omitempty"`
	SFCPolicyBSIDSubnetCIDR                string `json:"sfcPolicyBSIDSubnetCIDR,omitempty"`
	SFCServiceFunctionSIDSubnetCIDR        string `json:"sfcServiceFunctionSIDSubnetCIDR,omitempty"`
	SFCEndLocalSIDSubnetCIDR               string `json:"sfcEndLocalSIDSubnetCIDR,omitempty"`
	SFCIDLengthUsedInSidForServiceFunction uint8  `json:"sfcIDLengthUsedInSidForServiceFunction,omitempty"`
}

SRv6Config is part of IPAM configuration that configures SID prefixes of SRv6 components

Jump to

Keyboard shortcuts

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