Documentation ¶
Index ¶
- Constants
- Variables
- func Run(ctx context.Context, config *Configuration)
- type Configuration
- type Controller
- func (c *Controller) AddDnatRule(...) error
- func (c *Controller) CheckGatewayReady()
- func (c *Controller) CheckNodePortGroup()
- func (c *Controller) DelDnatRule(vpcName, dnatName, externalIP, externalPort string) error
- 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)
- func (c *Controller) UpdateChassisTag(node *v1.Node) error
- type ErrChassisNotFound
- type NamedPort
- type SlrInfo
- type VpcLoadBalancer
Constants ¶
View Source
const ( CorednsContainerName = "coredns" CorednsLabelKey = "k8s-app" CorednsTemplateDep = "coredns-template.yaml" )
View Source
const ( QoSAdd = "qos-add" QoSDel = "qos-del" )
Variables ¶
View Source
var (
VpcNatCmVersion = ""
)
Functions ¶
func Run ¶ added in v1.12.0
func Run(ctx context.Context, config *Configuration)
Run creates and runs a new ovn controller
Types ¶
type Configuration ¶
type Configuration struct { OvnNbAddr string OvnSbAddr string OvnTimeout int OvsDbConnectTimeout int OvsDbInactivityTimeout 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 WorkerNum int PprofPort int32 EnablePprof bool SecureServing 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 BfdMinTx int BfdMinRx int BfdDetectMult int NodeLocalDNSIP string }
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 { OVNNbClient ovs.NbClient OVNSbClient ovs.SbClient // ExternalGatewayType define external gateway type, centralized ExternalGatewayType string 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 (*Controller) AddDnatRule ¶ added in v1.12.0
func (c *Controller) AddDnatRule(vpcName, dnatName, externalIP, internalIP, externalPort, internalPort, protocol string) error
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) DelDnatRule ¶ added in v1.12.0
func (c *Controller) DelDnatRule(vpcName, dnatName, externalIP, externalPort string) error
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.
func (*Controller) UpdateChassisTag ¶ added in v1.12.1
func (c *Controller) UpdateChassisTag(node *v1.Node) error
type ErrChassisNotFound ¶ added in v1.12.19
func (*ErrChassisNotFound) Error ¶ added in v1.12.19
func (e *ErrChassisNotFound) Error() string
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
type SlrInfo ¶ added in v1.12.1
func NewSlrInfo ¶ added in v1.11.0
func NewSlrInfo(slr *kubeovnv1.SwitchLBRule) *SlrInfo
Source Files ¶
- config.go
- controller.go
- endpoint.go
- exporter.go
- external_gw.go
- external_vpc.go
- gc.go
- init.go
- inspection.go
- ip.go
- ippool.go
- namespace.go
- net_metrics.go
- network_policy.go
- node.go
- ovn_dnat.go
- ovn_eip.go
- ovn_fip.go
- ovn_snat.go
- pod.go
- provider_network.go
- qos_policy.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.go
- vpc_nat_gateway.go
- vpc_nat_gw_eip.go
- vpc_nat_gw_nat.go
Click to show internal directories.
Click to hide internal directories.