import "istio.io/istio/pkg/bootstrap/platform"
const ( AWSRegion = "aws_region" AWSAvailabilityZone = "aws_availability_zone" AWSInstanceID = "aws_instance_id" AWSAccountID = "aws_account_id" )
const ( GCPProject = "gcp_project" GCPCluster = "gcp_gke_cluster_name" GCPLocation = "gcp_location" GCEInstanceID = "gcp_gce_instance_id" )
IsAWS returns whether or not the platform for bootstrapping is Amazon Web Services.
IsGCP returns whether or not the platform for bootstrapping is Google Cloud Platform.
type Environment interface { // Metadata returns a collection of environmental metadata, structured // as a map for metadata names to values. An example for GCP would be a // mapping from "gcp_project" to "2344534543". Keys should be prefixed // by the short name for the platform (example: "gcp_"). Metadata() map[string]string // Locality returns the run location for the bootstrap transformed from the // platform-specific representation into the Envoy Locality schema. Locality() *core.Locality }
Environment provides information for the platform on which the bootstrapping is taking place.
func NewAWS() Environment
NewAWS returns a platform environment customized for AWS. Metadata returned by the AWS Environment is taken from the EC2 metadata service.
func NewGCP() Environment
NewGCP returns a platform environment customized for Google Cloud Platform. Metadata returned by the GCP Environment is taken from the GCE metadata service.
type Unknown struct{}
Unknown provides a default platform environment for cases in which the platform on which the bootstrapping is taking place cannot be determined.
Locality returns an empty core.Locality struct.
Metadata returns an empty map.
Package platform imports 7 packages (graph) and is imported by 2 packages. Updated 2019-12-11. Refresh now. Tools for package owners.