provider

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultName is the name of Provider object
	DefaultName = "default"
	// DefaultNamespace is the namespace of Provider object
	DefaultNamespace = "default"
)

Variables

This section is empty.

Functions

func GetProviderCredentials

func GetProviderCredentials(ctx context.Context, k8sClient client.Client, provider *v1beta1.Provider, region string) (map[string]string, error)

GetProviderCredentials gets provider credentials by cloud provider name

func GetProviderFromConfiguration

func GetProviderFromConfiguration(ctx context.Context, k8sClient client.Client, namespace, name string) (*v1beta1.Provider, error)

GetProviderFromConfiguration gets provider object from Configuration

func ValidateProviderCredentials

func ValidateProviderCredentials(ctx context.Context, k8sClient client.Client, provider *v1beta1.Provider) error

ValidateProviderCredentials validates provider credentials by cloud provider name

Types

type AWSCredentials

type AWSCredentials struct {
	AWSAccessKeyID     string `yaml:"awsAccessKeyID"`
	AWSSecretAccessKey string `yaml:"awsSecretAccessKey"`
	AWSSessionToken    string `yaml:"awsSessionToken"`
}

AWSCredentials are credentials for AWS

type AlibabaCloudCredentials

type AlibabaCloudCredentials struct {
	AccessKeyID     string `yaml:"accessKeyID"`
	AccessKeySecret string `yaml:"accessKeySecret"`
	SecurityToken   string `yaml:"securityToken"`
}

AlibabaCloudCredentials are credentials for Alibaba Cloud

type AzureCredentials

type AzureCredentials struct {
	ARMClientID       string `yaml:"armClientID"`
	ARMClientSecret   string `yaml:"armClientSecret"`
	ARMSubscriptionID string `yaml:"armSubscriptionID"`
	ARMTenantID       string `yaml:"armTenantID"`
}

AzureCredentials are credentials for Azure

type CloudProvider

type CloudProvider string

CloudProvider is a type for mark a Cloud Provider

type ECCredentials

type ECCredentials struct {
	ECApiKey string `yaml:"ecApiKey"`
}

ECCredentials are credentials for Elastic CLoud

type GCPCredentials

type GCPCredentials struct {
	GCPCredentialsJSON string `yaml:"gcpCredentialsJSON"`
	GCPProject         string `yaml:"gcpProject"`
}

GCPCredentials are credentials for GCP

type UCloudCredentials

type UCloudCredentials struct {
	PublicKey  string `yaml:"publicKey"`
	PrivateKey string `yaml:"privateKey"`
	Region     string `yaml:"region"`
	ProjectID  string `yaml:"projectID"`
}

UCloudCredentials are credentials for UCloud

type VSphereCredentials

type VSphereCredentials struct {
	VSphereUser               string `yaml:"vSphereUser"`
	VSpherePassword           string `yaml:"vSpherePassword"`
	VSphereServer             string `yaml:"vSphereServer"`
	VSphereAllowUnverifiedSSL string `yaml:"vSphereAllowUnverifiedSSL,omitempty"`
}

VSphereCredentials are credentials for VSphere

Jump to

Keyboard shortcuts

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