cloudsupport

package
v0.0.83 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 21 Imported by: 8

Documentation

Index

Constants

View Source
const (
	TypeCloudProviderDescription workloadinterface.ObjectType = "CloudProviderDescribe" // DEPRECATED
	CloudProviderDescriptionKind                              = "ClusterDescription"    // DEPRECATED
	KS_CLOUD_PROVIDER_ENV_VAR                                 = "KS_CLOUD_PROVIDER"
	KS_KUBE_CLUSTER_ENV_VAR                                   = "KS_KUBE_CLUSTER"
)

Variables

This section is empty.

Functions

func CheckIsACRImage

func CheckIsACRImage(imageTag string) bool

func CheckIsECRImage

func CheckIsECRImage(imageTag string) bool

CheckIsECRImage check if this image is suspected as ECR hosted image

func CheckIsGCRImage

func CheckIsGCRImage(imageTag string) bool

func GetCloudProvider

func GetCloudProvider(currContext string) string

Try to lookup from env var and then from current context

func GetCloudVendorRegistryCredentials

func GetCloudVendorRegistryCredentials(imageTag string) (map[string]types.AuthConfig, error)

func GetDescriptiveInfoFromCloudProvider

func GetDescriptiveInfoFromCloudProvider(cluster string, cloudProvider string) (workloadinterface.IMetadata, error)

func GetImageRegistryCredentials

func GetImageRegistryCredentials(imageTag string, pod *corev1.Pod) (map[string]types.AuthConfig, error)

DEPRECATED GetImageRegistryCredentials returns various credentials for images in the pod imageTag empty means returns all of the credentials for all images in pod spec containers pod.ObjectMeta.Namespace must be well setted

func GetKubeContextName

func GetKubeContextName() string

func GetLoginDetailsForAzurCR

func GetLoginDetailsForAzurCR(imageTag string) (string, string, error)

GetLoginDetailsForAzurCR return user name + password to use

func GetLoginDetailsForECR

func GetLoginDetailsForECR(imageTag string) (string, string, error)

GetLoginDetailsForECR return user name + password using the default iam-role OR ~/.aws/config of the machine

func GetLoginDetailsForGCR

func GetLoginDetailsForGCR(imageTag string) (string, string, error)

GetLoginDetailsForGCR return user name + password to use

func GetWorkloadImageRegistryCredentials

func GetWorkloadImageRegistryCredentials(imageTag string, workload k8sinterface.IWorkload) (map[string]types.AuthConfig, error)

GetImageRegistryCredentials returns various credentials for images in the pod imageTag empty means returns all of the credentials for all images in pod spec containers pod.ObjectMeta.Namespace must be well setted

func GetWorkloadsImages

func GetWorkloadsImages(workload k8sinterface.IWorkload) map[string]string

GetWorkloadsImages returns map[<image name>]<container name>

func IsRunningInCloudProvider

func IsRunningInCloudProvider(cluster string) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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