config

package
v0.0.0-...-e204674 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultKubeConfigLocation = "/.kube/config"

DefaultKubeConfigLocation is the default location of the KubeConfig file.

View Source
const TriremeEnvPrefix = "TRIREME"

TriremeEnvPrefix is the prefix used to provide configuration through env variables.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// AuthType defines if Trireme uses PSK or PKI
	AuthType string
	// KubeNodeName is the identifier used for this Trireme instance
	KubeNodeName string
	// PSK is the PSK used for Trireme (if using PSK)
	PSK string
	// RemoteEnforcer defines if the enforcer is spawned into each POD namespace
	// or into the host default namespace.
	RemoteEnforcer bool

	TriremeNetworks       string
	ParsedTriremeNetworks []string

	KubeconfigPath string

	LogFormat string
	LogLevel  string

	// Credentials info for InfluxDB Collector interface
	CollectorEndpoint           string
	CollectorUser               string
	CollectorPass               string
	CollectorDB                 string
	CollectorInsecureSkipVerify bool

	// Enforce defines if this process is an enforcer process (spawned into POD namespaces)
	Enforce bool `mapstructure:"Enforce"`
}

Configuration contains all the User Parameter for Trireme-Kubernetes.

func LoadConfig

func LoadConfig() (*Configuration, error)

LoadConfig loads a Configuration struct: 1) If presents flags are used 2) If no flags, Env Variables are used 3) If no Env Variables, defaults are used when possible.

Jump to

Keyboard shortcuts

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