Documentation ¶
Index ¶
- Constants
- Variables
- 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)
- func SetIstioVersion(meta *model.BootstrapNodeMetadata) *model.BootstrapNodeMetadata
- type Config
- type Instance
- type MetadataOptions
Constants ¶
View Source
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_" )
View Source
const ( // EnvoyFileTemplate is a template for the root config JSON EnvoyFileTemplate = "envoy-rev.%s" DefaultCfgDir = "./var/lib/istio/envoy/envoy_bootstrap_tmpl.json" )
View Source
const ( // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added // to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets // to select new pods (and old pods being select by new ReplicaSet). DefaultDeploymentUniqueLabelKey string = "pod-template-hash" )
Variables ¶
View Source
var StripFragment = env.Register("HTTP_STRIP_FRAGMENT_FROM_PATH_UNSAFE_IF_DISABLED", true, "").Get()
Functions ¶
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 through
func ParseDownwardAPI ¶
ParseDownwardAPI parses fields which are stored as format `%s=%q` back to a map
func SetIstioVersion ¶
func SetIstioVersion(meta *model.BootstrapNodeMetadata) *model.BootstrapNodeMetadata
Types ¶
type Config ¶
type Config struct { *model.Node // CompliancePolicy to decouple the environment variable dependency. CompliancePolicy string LogAsJSON bool }
Config for creating a bootstrap file.
type Instance ¶
type Instance interface { // WriteTo writes the content of the Envoy bootstrap to the given writer. WriteTo(templateFile string, w io.Writer) error // CreateFile generates an Envoy bootstrap file. CreateFile() (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 CredentialSocketExists bool XDSRootCert string OutlierLogPath string EnvoyStatusPort int EnvoyPrometheusPort int ExitOnZeroActiveConnections bool MetadataDiscovery bool // contains filtered or unexported fields }
MetadataOptions for constructing node metadata.
Click to show internal directories.
Click to hide internal directories.