Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BridgesToNicCommand = cli.Command{ Name: "bridges-to-nic", Usage: "Delete ovs bridge and move IP/routes to underlying NIC", Flags: []cli.Flag{}, Action: func(context *cli.Context) error { args := context.Args() if len(args) == 0 { return fmt.Errorf("Please specify list of bridges") } if err := util.SetExec(kexec.New()); err != nil { return err } var errorList []error for _, bridge := range args { if err := util.BridgeToNic(bridge); err != nil { errorList = append(errorList, err) } } return errors.NewAggregate(errorList) }, }
BridgesToNicCommand removes a NIC interface from OVS bridge and deletes the bridge
View Source
var InitGatewayCmd = cli.Command{ Name: "gateway-init", Usage: "Initialize k8s gateway node", Flags: append([]cli.Flag{ cli.StringFlag{ Name: "cluster-ip-subnet", Usage: "The cluster wide larger subnet of private ip addresses.", }, cli.StringFlag{ Name: "physical-interface", Usage: "The physical interface via which external connectivity is provided.", }, cli.StringFlag{ Name: "bridge-interface", Usage: "The OVS bridge interface via which external connectivity is provided.", }, cli.StringFlag{ Name: "physical-ip", Usage: "The ip address of the physical interface or bridge interface via which external connectivity is provided. This should be of the form IP/MASK.", }, cli.StringFlag{ Name: "node-name", Usage: "A unique node name.", }, cli.StringFlag{ Name: "default-gw", Usage: "The next hop IP address for your physical interface.", }, cli.StringFlag{ Name: "rampout-ip-subnets", Usage: "Uses this gateway to rampout traffic originating from the specified comma separated ip subnets. Used to distribute outgoing traffic via multiple gateways.", }, cli.BoolFlag{ Name: "enable-load-balancers", Usage: "Enable load-balancers on Gateway router for nodeports.", }, }, config.Flags...), Action: func(context *cli.Context) error { if err := initGateway(context); err != nil { return fmt.Errorf("failed init gateway: %v", err) } return nil }, }
InitGatewayCmd initializes k8s gateway node.
View Source
var NicsToBridgeCommand = cli.Command{ Name: "nics-to-bridge", Usage: "Create ovs bridge for nic interfaces", Flags: []cli.Flag{}, Action: func(context *cli.Context) error { args := context.Args() if len(args) == 0 { return fmt.Errorf("Please specify list of nic interfaces") } if err := util.SetExec(kexec.New()); err != nil { return err } var errorList []error for _, nic := range args { if _, err := util.NicToBridge(nic); err != nil { errorList = append(errorList, err) } } return errors.NewAggregate(errorList) }, }
NicsToBridgeCommand creates ovs bridge for provided nic interfaces.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.