Documentation ¶
Index ¶
- Constants
- func GetProviderCredentials(ctx context.Context, k8sClient client.Client, provider *v1beta1.Provider, ...) (map[string]string, error)
- func GetProviderFromConfiguration(ctx context.Context, k8sClient client.Client, namespace, name string) (*v1beta1.Provider, error)
- type AWSCredentials
- type AlibabaCloudCredentials
- type AzureCredentials
- type BaiduCloudCredentials
- type CloudProvider
- type CustomCredentials
- type ECCredentials
- type GCPCredentials
- type TencentCloudCredentials
- type UCloudCredentials
- type VSphereCredentials
Constants ¶
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 Returns: 1) (nil, err): hit an issue to find the provider 2) (nil, nil): provider not found 3) (provider, nil): provider found
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 BaiduCloudCredentials ¶ added in v0.3.5
type BaiduCloudCredentials struct { KeyBaiduAccessKey string `yaml:"accessKey"` KeyBaiduSecretKey string `yaml:"secretKey"` }
BaiduCloudCredentials are credentials for Baidu Cloud
type CustomCredentials ¶ added in v0.3.1
CustomCredentials are credentials for custom (you self)
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 TencentCloudCredentials ¶ added in v0.3.3
type TencentCloudCredentials struct { SecretID string `yaml:"secretID"` SecretKey string `yaml:"secretKey"` }
TencentCloudCredentials are credentials for Tencent Cloud
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