Documentation ¶
Index ¶
- Constants
- func Base64ToMap(base64 string) (map[string]string, error)
- func ClusterName(clusterName string, client metadataClient.Client) (string, error)
- func ClusterRegion(clusterRegion string, clientCreator func() metadataClient.Client) (string, error)
- func MapToBase64(extensions map[string]string) (string, error)
- func ProjectIDOrDefault(projectID string) (string, error)
- func ZoneToRegion(zone string) (string, error)
- type ProjectIDEnvConfig
Constants ¶
View Source
const (
// ProjectIDEnvKey is the name of environmental variable for project ID
ProjectIDEnvKey = "PROJECT_ID"
)
Variables ¶
This section is empty.
Functions ¶
func ClusterName ¶ added in v0.15.0
func ClusterName(clusterName string, client metadataClient.Client) (string, error)
ClusterName returns the cluster name for a particular resource.
func ClusterRegion ¶ added in v0.21.0
func ClusterRegion(clusterRegion string, clientCreator func() metadataClient.Client) (string, error)
ClusterRegion returns the region of the cluster
func ProjectIDOrDefault ¶ added in v0.19.0
ProjectIDOrDefault returns the project ID by performing the following order: 1) if the input project ID is valid, simply use it. 2) if there is a PROJECT_ID environmental variable, use it. 3) use metadataClient to resolve project id.
func ZoneToRegion ¶ added in v0.21.0
ZoneToRegion converts a GKE zone to its region
Types ¶
type ProjectIDEnvConfig ¶ added in v0.19.0
type ProjectIDEnvConfig struct {
ProjectID string `envconfig:"PROJECT_ID"`
}
ProjectIDEnvConfig is a struct to parse project ID from env var
Directories ¶
Path | Synopsis |
---|---|
Package appcredentials provides utilities for the application credentials used to access GCP services.
|
Package appcredentials provides utilities for the application credentials used to access GCP services. |
Package authcheck provides utilities to check authentication configuration for data plane resources.
|
Package authcheck provides utilities to check authentication configuration for data plane resources. |
Package mainhelper provides helper functions for common boilerplate code in writing a main function such as setting up kube informers.
|
Package mainhelper provides helper functions for common boilerplate code in writing a main function such as setting up kube informers. |
Click to show internal directories.
Click to hide internal directories.