gcp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CredentialsMountPath = "/var/run/secrets/tokens/gcp-ksa"
	CredentialsFileName  = "google-application-credentials.json"

	ServiceAccountTokenExpiration = int64(60 * 60 * 24 * 2) // Two days
)

Functions

func GetGCPConfigMapName

func GetGCPConfigMapName(ownerName string) string

func GetGCPContainerVolume

func GetGCPContainerVolume(workloadIdentityPool string, name string) corev1.Volume

func GetGCPContainerVolumeMount

func GetGCPContainerVolumeMount() corev1.VolumeMount

func GetGCPEnvVar

func GetGCPEnvVar() corev1.EnvVar

func GetGoogleServiceAccountCredentialsConfigMap

func GetGoogleServiceAccountCredentialsConfigMap(ctx context.Context, namespace string, name string, gcpServiceAccount string, workloadIdentityConfigMap corev1.ConfigMap) (corev1.ConfigMap, error)

Types

type CredentialSource

type CredentialSource struct {
	File string `json:"file"`
}

type WorkloadIdentityCredentials

type WorkloadIdentityCredentials struct {
	Type                           string           `json:"type"`
	Audience                       string           `json:"audience"`
	ServiceAccountImpersonationUrl string           `json:"service_account_impersonation_url"`
	SubjectTokenType               string           `json:"subject_token_type"`
	TokenUrl                       string           `json:"token_url"`
	CredentialSource               CredentialSource `json:"credential_source"`
}

Jump to

Keyboard shortcuts

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