kubernetes

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 22 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) 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) UplinkHWAddr added in v0.2.0

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

type Coordinator added in v0.2.0

type Coordinator struct {
	// The name of the lock and the namespace to store it in.
	LockName      string
	LockNamespace string

	// These are as defined in
	// k8s.io/client-go/tools/leaderelection.LeaderElectionConfig.
	LeaseDuration time.Duration
	RenewDeadline time.Duration
	RetryPeriod   time.Duration
}

func (*Coordinator) Run added in v0.2.0

func (c *Coordinator) Run(ctx context.Context, m ha.Member) (err error)

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"`
}

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