Documentation ¶
Index ¶
- Constants
- Variables
- func InitClientGoMetrics()
- func InitWorkQueueMetrics()
- func NewSlrInfo(slr *kubeovnv1.SwitchLBRule) *slrInfo
- func PodNameToEipName(name, namespace string) string
- type Configuration
- type Controller
- func (c *Controller) CheckGatewayReady()
- func (c *Controller) CheckNodePortGroup()
- func (c *Controller) GenVpcLoadBalancer(vpcKey string) *VpcLoadBalancer
- func (c *Controller) GetEip(eipName string) (*kubeovnv1.IptablesEIP, error)
- func (c *Controller) GetGwBySubnet(name string) (string, string, error)
- func (c *Controller) GetOvnEip(eipName string) (*kubeovnv1.OvnEip, error)
- func (c *Controller) InitDefaultVpc() error
- func (c *Controller) InitIPAM() error
- func (c *Controller) InitOVN() error
- func (c *Controller) Run(ctx context.Context)
- type NamedPort
- type VpcLoadBalancer
Constants ¶
View Source
const ( INIT_ROUTE_TABLE = "init" POD_EIP_ADD = "eip-add" POD_DNAT_ADD = "dnat-add" ATTACHMENT_NAME = "lb-svc-attachment" ATTACHMENT_NS = "kube-system" )
View Source
const ( CorednsContainerName = "coredns" CorednsLabelKey = "k8s-app" CorednsTemplateDep = "coredns-template.yaml" InitRouteImage = "kubeovn/vpc-nat-gateway:v1.11.10" )
Variables ¶
View Source
var ( VpcNatCmVersion = "" NAT_GW_CREATED_AT = "" )
View Source
var ( // external underlay vlan macvlan network attachment definition provider MACVLAN_NAD_PROVIDER = fmt.Sprintf("%s.%s", util.VpcExternalNet, ATTACHMENT_NS) )
Functions ¶
func InitClientGoMetrics ¶ added in v1.7.0
func InitClientGoMetrics()
func InitWorkQueueMetrics ¶ added in v1.7.0
func InitWorkQueueMetrics()
func NewSlrInfo ¶ added in v1.11.0
func NewSlrInfo(slr *kubeovnv1.SwitchLBRule) *slrInfo
func PodNameToEipName ¶ added in v1.11.0
Types ¶
type Configuration ¶
type Configuration struct { BindAddress string OvnNbAddr string OvnSbAddr string OvnTimeout int CustCrdRetryMaxDelay int CustCrdRetryMinDelay int KubeConfigFile string KubeRestConfig *rest.Config KubeClient kubernetes.Interface KubeOvnClient clientset.Interface AttachNetClient attachnetclientset.Interface KubevirtClient kubecli.KubevirtClient // with no timeout KubeFactoryClient kubernetes.Interface KubeOvnFactoryClient clientset.Interface DefaultLogicalSwitch string DefaultCIDR string DefaultGateway string DefaultExcludeIps string DefaultGatewayCheck bool DefaultLogicalGateway bool DefaultU2OInterconnection bool ClusterRouter string NodeSwitch string NodeSwitchCIDR string NodeSwitchGateway string ServiceClusterIPRange string ClusterTcpLoadBalancer string ClusterUdpLoadBalancer string ClusterSctpLoadBalancer string ClusterTcpSessionLoadBalancer string ClusterUdpSessionLoadBalancer string ClusterSctpSessionLoadBalancer string PodName string PodNamespace string PodNicType string PodDefaultFipType string WorkerNum int PprofPort int EnablePprof bool NodePgProbeTime int NetworkType string DefaultProviderName string DefaultHostInterface string DefaultExchangeLinkName bool DefaultVlanName string DefaultVlanID int LsDnatModDlDst bool LsCtSkipDstLportIPs bool EnableLb bool EnableNP bool EnableEipSnat bool EnableExternalVpc bool EnableEcmp bool EnableKeepVmIP bool EnableLbSvc bool EnableMetrics bool ExternalGatewaySwitch string ExternalGatewayConfigNS string ExternalGatewayNet string ExternalGatewayVlanID int GCInterval int InspectInterval int }
Configuration is the controller conf
func ParseFlags ¶
func ParseFlags() (*Configuration, error)
ParseFlags parses cmd args then init kubeclient and conf TODO: validate configuration
type Controller ¶
type Controller struct { UpdateSwitchLBRuleQueue workqueue.RateLimitingInterface // contains filtered or unexported fields }
Controller is kube-ovn main controller that watch ns/pod/node/svc/ep and operate ovn
func NewController ¶
func NewController(config *Configuration) *Controller
NewController returns a new ovn controller
func (*Controller) CheckGatewayReady ¶ added in v1.7.0
func (c *Controller) CheckGatewayReady()
func (*Controller) CheckNodePortGroup ¶ added in v1.8.0
func (c *Controller) CheckNodePortGroup()
func (*Controller) GenVpcLoadBalancer ¶ added in v1.8.0
func (c *Controller) GenVpcLoadBalancer(vpcKey string) *VpcLoadBalancer
func (*Controller) GetEip ¶ added in v1.10.0
func (c *Controller) GetEip(eipName string) (*kubeovnv1.IptablesEIP, error)
func (*Controller) GetGwBySubnet ¶ added in v1.11.0
func (c *Controller) GetGwBySubnet(name string) (string, string, error)
func (*Controller) GetOvnEip ¶ added in v1.11.0
func (c *Controller) GetOvnEip(eipName string) (*kubeovnv1.OvnEip, error)
func (*Controller) InitDefaultVpc ¶ added in v1.7.0
func (c *Controller) InitDefaultVpc() error
func (*Controller) InitIPAM ¶ added in v1.7.0
func (c *Controller) InitIPAM() error
func (*Controller) InitOVN ¶ added in v1.7.0
func (c *Controller) InitOVN() error
func (*Controller) Run ¶
func (c *Controller) Run(ctx context.Context)
Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.
type NamedPort ¶ added in v1.11.2
type NamedPort struct {
// contains filtered or unexported fields
}
func NewNamedPort ¶ added in v1.11.2
func NewNamedPort() *NamedPort
func (*NamedPort) AddNamedPortByPod ¶ added in v1.11.2
func (*NamedPort) DeleteNamedPortByPod ¶ added in v1.11.2
func (*NamedPort) GetNamedPortByNs ¶ added in v1.11.2
func (n *NamedPort) GetNamedPortByNs(namespace string) map[string]*util.NamedPortInfo
Source Files ¶
- client_go_adapter.go
- config.go
- controller.go
- endpoint.go
- exporter.go
- external-gw.go
- external_vpc.go
- gc.go
- init.go
- inspection.go
- ip.go
- namespace.go
- net_metrics.go
- network_policy.go
- node.go
- ovn_eip.go
- ovn_fip.go
- ovn_snat.go
- pod.go
- pod_iptables_eip.go
- pod_iptables_fip.go
- provider-network.go
- security_group.go
- service.go
- service_lb.go
- subnet.go
- switch_lb_rule.go
- vip.go
- vlan.go
- vpc.go
- vpc_dns.go
- vpc_lb.go
- vpc_nat_gateway.go
- vpc_nat_gw_eip.go
- vpc_nat_gw_nat.go
- workqueue_metrics.go
Click to show internal directories.
Click to hide internal directories.