Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertNodeToXDSNode(node *model.Node) *core.Node
- func ConvertXDSNodeToNode(node *core.Node) *model.Node
- func GetEffectiveTemplatePath(pc *model.NodeMetaProxyConfig) string
- func GetNodeMetaData(options MetadataOptions) (*model.Node, error)
- func ParseDownwardAPI(i string) (map[string]string, error)
- func ReadPodAnnotations(path string) (map[string]string, error)
- type Config
- type Instance
- type MetadataOptions
Constants ¶
const ( // 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_" )
const ( // EpochFileTemplate is a template for the root config JSON EpochFileTemplate = "envoy-rev%d.%s" DefaultCfgDir = "./var/lib/istio/envoy/envoy_bootstrap_tmpl.json" )
Variables ¶
var DefaultStatTags = []string{
"reporter",
"source_namespace",
"source_workload",
"source_workload_namespace",
"source_principal",
"source_app",
"source_version",
"source_cluster",
"destination_namespace",
"destination_workload",
"destination_workload_namespace",
"destination_principal",
"destination_app",
"destination_version",
"destination_service",
"destination_service_name",
"destination_service_namespace",
"destination_port",
"destination_cluster",
"request_protocol",
"request_operation",
"request_host",
"response_flags",
"grpc_response_status",
"connection_security_policy",
"source_canonical_service",
"destination_canonical_service",
"source_canonical_revision",
"destination_canonical_revision",
}
DefaultStatTags for telemetry v2 tag extraction.
var StripFragment = env.RegisterBoolVar("HTTP_STRIP_FRAGMENT_FROM_PATH_UNSAFE_IF_DISABLED", true, "").Get()
Functions ¶
func ConvertNodeToXDSNode ¶
ConvertNodeToXDSNode creates an Envoy node descriptor from Istio node descriptor.
func ConvertXDSNodeToNode ¶
ConvertXDSNodeToNode parses Istio node descriptor from an Envoy node descriptor, using only typed metadata.
func GetEffectiveTemplatePath ¶
func GetEffectiveTemplatePath(pc *model.NodeMetaProxyConfig) string
GetEffectiveTemplatePath gets the template file that should be used for bootstrap
func GetNodeMetaData ¶
func GetNodeMetaData(options MetadataOptions) (*model.Node, error)
GetNodeMetaData function uses an environment variable contract ISTIO_METAJSON_* env variables contain json_string in the value. The name of variable is ignored. ISTIO_META_* env variables are passed thru
func ParseDownwardAPI ¶
ParseDownwardAPI parses fields which are stored as format `%s=%q` back to a map
Types ¶
type Instance ¶
type Instance interface { // WriteTo writes the content of the Envoy bootstrap to the given writer. WriteTo(templateFile string, w io.Writer) error // CreateFileForEpoch generates an Envoy bootstrap file for a particular epoch. CreateFileForEpoch(epoch int) (string, error) }
Instance of a configured Envoy bootstrap writer.
type MetadataOptions ¶
type MetadataOptions struct { Envs []string Platform platform.Environment InstanceIPs []string StsPort int ID string ProxyConfig *meshAPI.ProxyConfig PilotSubjectAltName []string XDSRootCert string OutlierLogPath string ProvCert string EnvoyStatusPort int EnvoyPrometheusPort int ExitOnZeroActiveConnections bool // contains filtered or unexported fields }
MetadataOptions for constructing node metadata.