gcp

package
v0.0.0-...-cac5726 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GCPInitTime time.Duration
)

Functions

func InitGCP

func InitGCP(ctx context.Context, kr *mesh.KRun) error

func PostConfigLoad

func PostConfigLoad(ctx context.Context, kr *mesh.KRun) error

func ProjectLabels

func ProjectLabels(ctx context.Context, p string) (map[string]string, error)

func ProjectNumber

func ProjectNumber(p string) string

func RegionFromMetadata

func RegionFromMetadata() (string, error)

Types

type Cluster

type Cluster struct {
	ClusterName     string
	ClusterLocation string
	ProjectId       string

	GKECluster *containerpb.Cluster

	KubeConfig *kubeconfig.Config
}

Cluster wraps cluster information for a discovered hub or gke cluster.

func AllClusters

func AllClusters(ctx context.Context, kr *mesh.KRun, configProjectId string,
	label string, meshID string) ([]*Cluster, error)

func GKECluster

func GKECluster(ctx context.Context, kr *mesh.KRun, p, l, clusterName string) (*Cluster, error)

Jump to

Keyboard shortcuts

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