config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigFilePath is the config file path for more fine grained control.
	ConfigFilePath = "/etc/openvswitch/ovn_k8s.conf"
)

Variables

View Source
var (
	// MTU value used for the overlay networks.
	MTU = 1400
	// ConntrackZone affects only the gateway nodes, This value is used to track connections
	// that are initiated from the pods so that the reverse connections go back to the pods.
	// This represents the conntrack zone used for the conntrack flow rules.
	ConntrackZone = 64000
	// OvnMode can be overlay or underlay, At the moment only overlay networks are supported.
	OvnMode = "overlay"
	// OvnNB is the address of ovn northbound API server.
	OvnNB string
	// Scheme stores the scheme of OvnNB, eg. "ssl","tcp","unix".
	Scheme string
	// LogPath is the log path of ovn-k8s-cni-overlay binary.
	LogPath = "/var/log/openvswitch/ovn-k8s-cni-overlay.log"
	// UnixSocket is the unix socket path of ovn northbound database.
	UnixSocket = "/var/run/openvswitch/ovnnb_db.sock"
	// CniConfPath is the path of cni config file.
	CniConfPath = "/etc/cni/net.d"
	// CniLinkPath is the path of cni bin.
	CniLinkPath = "/opt/cni/bin"
	// CniPlugin is the name of cni
	CniPlugin = "ovn-k8s-cni-overlay"
	// NbctlPrivateKey is the private key for authenticating OVN DB.
	NbctlPrivateKey = "/etc/openvswitch/ovncontroller-privkey.pem"
	// NbctlCertificate is the certificate for authenticating OVN DB.
	NbctlCertificate = "/etc/openvswitch/ovncontroller-cert.pem"
	// NbctlCACert is the CA certificate for authenticating OVN DB.
	NbctlCACert = "/etc/openvswitch/ovnnb-ca.cert"
	// K8sCACertificate is k8s CA certificate.
	K8sCACertificate = "/etc/openvswitch/k8s-ca.crt"
	// Rundir is run dir of OVS core utilities, between "/var/run/openvswitch" and "/usr/local/var/run/openvswitch".
	Rundir string
	// Logdir is log dir of OVS core utilities, between "/var/log/openvswitch" and "/usr/local/var/log/openvswitch".
	Logdir string
)

Functions

func FetchConfig

func FetchConfig()

FetchConfig fetch config file to override default values.

Types

type Config

type Config struct {
	Default struct {
		// MTU value used for the overlay networks.
		MTU int `gcfg:"mtu"`
		// ConntrackZone affects only the gateway nodes, This value is used to track connections
		// that are initiated from the pods so that the reverse connections go back to the pods.
		// This represents the conntrack zone used for the conntrack flow rules.
		ConntrackZone int `gcfg:"conntrack-zone"`
		// OvnMode can be overlay or underlay, At the moment only overlay networks are supported.
		OvnMode string `gcfg:"ovn-mode"`
		// The following config values are used for the CNI plugin.
		LogPath     string `gcfg:"log-path"`
		UnixSocket  string `gcfg:"unix-socket"`
		CniConfPath string `gcfg:"cni-conf-path"`
		CniLinkPath string `gcfg:"cni-link-path"`
		CniPlugin   string `gcfg:"cni-plugin"`
		// OVN and K8S certificates are stored in the following options.
		PrivateKey       string `gcfg:"private-key"`
		Certificate      string `gcfg:"certificate"`
		CACert           string `gcfg:"ca-cert"`
		K8sCACertificate string `gcfg:"k8s-ca-certificate"`
		// We do not know how OVS core utilities have been installed. If those values are not set,
		// we try to do a best guess for rundir,logdir and choose between "/var/run/openvswitch","/var/log/openvswitch"
		// and "/usr/local/var/run/openvswitch","/usr/local/var/log/openvswitch".
		Rundir string `gcfg:"rundir"`
		Logdir string `gcfg:"logdir"`
	}
}

Config is used for more fine grained control.

Jump to

Keyboard shortcuts

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