bootstrap

package
v0.0.0-...-fe632b3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EpochFileTemplate is a template for the root config JSON
	EpochFileTemplate = "envoy-rev%d.json"
	DefaultCfgDir     = "/var/lib/istio/envoy/envoy_bootstrap_tmpl.json"
	// MaxClusterNameLength is the maximum cluster name length
	MaxClusterNameLength = 189 // TODO: use MeshConfig.StatNameLength instead

	// IstioMetaPrefix is used to pass env vars as node metadata.
	IstioMetaPrefix = "ISTIO_META_"

	// IstioMetaJSONPrefix is used to pass annotations and similar environment info.
	IstioMetaJSONPrefix = "ISTIO_METAJSON_"

	// statsPatterns gives the developer control over Envoy stats collection
	EnvoyStatsMatcherInclusionPatterns = "sidecar.istio.io/statsInclusionPrefixes"
)

Generate the envoy v2 bootstrap configuration, using template.

Variables

This section is empty.

Functions

func GetHostPort

func GetHostPort(name, addr string) (host string, port string, err error)

GetHostPort separates out the host and port portions of an address. The host portion may be a name, IPv4 address, or IPv6 address (with square brackets).

func RunProxy

func RunProxy(config *meshconfig.ProxyConfig, node string, epoch int, configFname string, doneChan chan error,
	outWriter io.Writer, errWriter io.Writer, cliarg []string) (*os.Process, error)

RunProxy will run sidecar with a v2 config generated from template according with the config. The doneChan will be notified if the envoy process dies. The returned process can be killed by the caller to terminate the proxy.

func StoreHostPort

func StoreHostPort(host, port, field string, opts map[string]interface{})

StoreHostPort encodes the host and port as key/value pair strings in the provided map.

func WriteBootstrap

func WriteBootstrap(config *meshconfig.ProxyConfig, node string, epoch int, pilotSAN []string,
	opts map[string]interface{}, localEnv []string, nodeIPs []string) (string, error)

WriteBootstrap generates an envoy config based on config and epoch, and returns the filename. TODO: in v2 some of the LDS ports (port, http_port) should be configured in the bootstrap.

Types

This section is empty.

Jump to

Keyboard shortcuts

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