utils

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	KeyNetworkConf         = network.GroupName + "/route"
	KeyVlanLabel           = network.GroupName + "/vlan-id"
	KeyVlanConfigLabel     = network.GroupName + "/vlanconfig"
	KeyClusterNetworkLabel = network.GroupName + "/clusternetwork"
	KeyNodeLabel           = network.GroupName + "/node"

	KeyMatchedNodes = network.GroupName + "/matched-nodes"

	ValueTrue = "true"
)

Variables

This section is empty.

Functions

func EnsureSysctlValue added in v0.3.0

func EnsureSysctlValue(name, value string) error

func Name added in v0.3.0

func Name(namespace, name string) string

func NewSelector added in v0.3.0

func NewSelector(selector map[string]string) (labels.Selector, error)

Types

type Connectivity

type Connectivity string
const (
	Connectable   Connectivity = "true"
	Unconnectable Connectivity = "false"
	DHCPFailed    Connectivity = "DHCP failed"
	PingFailed    Connectivity = "ping failed"
)

type Layer3NetworkConf

type Layer3NetworkConf struct {
	Mode         Mode         `json:"mode,omitempty"`
	CIDR         string       `json:"cidr,omitempty"`
	Gateway      string       `json:"gateway,omitempty"`
	ServerIPAddr string       `json:"serverIPAddr,omitempty"`
	Connectivity Connectivity `json:"connectivity,omitempty"`
}

func NewLayer3NetworkConf

func NewLayer3NetworkConf(conf string) (*Layer3NetworkConf, error)

func (*Layer3NetworkConf) ToString

func (c *Layer3NetworkConf) ToString() (string, error)

type Mode

type Mode string
const (
	Auto   Mode = "auto"
	Manual Mode = "manual"
)

type NadSelectedNetworks

type NadSelectedNetworks []nadv1.NetworkSelectionElement

func NewNADSelectedNetworks

func NewNADSelectedNetworks(conf string) (NadSelectedNetworks, error)

func (NadSelectedNetworks) ToString

func (n NadSelectedNetworks) ToString() (string, error)

type NetConf added in v0.3.0

type NetConf struct {
	cniv1.NetConf
	BrName       string `json:"bridge"`
	IsGW         bool   `json:"isGateway"`
	IsDefaultGW  bool   `json:"isDefaultGateway"`
	ForceAddress bool   `json:"forceAddress"`
	IPMasq       bool   `json:"ipMasq"`
	MTU          int    `json:"mtu"`
	HairpinMode  bool   `json:"hairpinMode"`
	PromiscMode  bool   `json:"promiscMode"`
	Vlan         int    `json:"vlan"`
}

Jump to

Keyboard shortcuts

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