Documentation ¶
Index ¶
- Constants
- func GetHostPort(name, addr string) (host string, port string, err error)
- func RunProxy(config *meshconfig.ProxyConfig, node string, epoch int, configFname string, ...) (*os.Process, error)
- func StoreHostPort(host, port, field string, opts map[string]interface{})
- func WriteBootstrap(config *meshconfig.ProxyConfig, node string, epoch int, pilotSAN []string, ...) (string, error)
Constants ¶
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_" )
Generate the envoy v2 bootstrap configuration, using template.
Variables ¶
This section is empty.
Functions ¶
func GetHostPort ¶
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 ¶
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) (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.