kubernetes

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InCluster

func InCluster() bool

Returns if it seems the current environment is hosted by Kubernetes.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig(ctx context.Context, params Params) (*Config, error)

func (*Config) ExtraRules

func (cfg *Config) ExtraRules() rules.RuleSet

func (*Config) FlatNetworks

func (cfg *Config) FlatNetworks() []fw.StaticRoute

func (*Config) HACoordinator added in v0.2.17

func (cfg *Config) HACoordinator() ha.Coordinator

func (*Config) LAN

func (cfg *Config) LAN() fw.Link

func (*Config) LANAddr added in v0.2.0

func (cfg *Config) LANAddr() (a fw.Addr, ok bool)

func (*Config) LANHWAddr added in v0.2.0

func (cfg *Config) LANHWAddr() net.HardwareAddr
func (cfg *Config) Uplink() fw.Link

func (*Config) UplinkAddr added in v0.2.19

func (cfg *Config) UplinkAddr() (a fw.Addr, ok bool)

func (*Config) UplinkGW added in v0.2.19

func (cfg *Config) UplinkGW() (a net.IP, ok bool)

func (*Config) UplinkHWAddr added in v0.2.0

func (cfg *Config) UplinkHWAddr() net.HardwareAddr

func (*Config) UplinkLeaseStore added in v0.2.12

func (cfg *Config) UplinkLeaseStore() dhcp.LeaseStore

type HAParams added in v0.2.17

type HAParams struct {
	LockName      string `json:"lockName"`
	LeaseDuration string `json:"leaseDuration"`
	RenewDeadline string `json:"renewDeadline"`
	RetryPeriod   string `json:"retryPeriod"`
}

type Params

type Params struct {
	LANNetwork           string    `json:"lanNetwork"`
	LANMACAddress        string    `json:"lanMACAddress"`
	FlatNetworks         []string  `json:"flatNetworks"`
	UplinkNetwork        string    `json:"uplinkNetwork"`
	UplinkInterface      string    `json:"uplinkInterface"`
	UplinkMACAddress     string    `json:"uplinkMACAddress"`
	UplinkIPAddress      string    `json:"uplinkIPAddress"`
	UplinkGWAddress      string    `json:"uplinkGWAddress"`
	UplinkLeaseConfigMap string    `json:"uplinkLeaseConfigMap"`
	HA                   *HAParams `json:"ha"`
}

func ParamsFromFile

func ParamsFromFile() (params Params, err error)

Reads params from the file `/etc/config/egress.json`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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