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 HuaWeiCloudCredentials
- type TencentCloudCredentials
- type UCloudCredentials
- type VSphereCredentials
Constants ¶
const ( // EnvAWSAccessKeyID is the name of the AWS_ACCESS_KEY_ID env EnvAWSAccessKeyID = "AWS_ACCESS_KEY_ID" // EnvAWSSecretAccessKey is the name of the AWS_SECRET_ACCESS_KEY env EnvAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY" // EnvAWSDefaultRegion is the name of the AWS_DEFAULT_REGION env EnvAWSDefaultRegion = "AWS_DEFAULT_REGION" // EnvAWSSessionToken is the name of the AWS_SESSION_TOKEN env EnvAWSSessionToken = "AWS_SESSION_TOKEN" )
const ( // DefaultName is the name of Provider object DefaultName = "default" // DefaultNamespace is the namespace of Provider object DefaultNamespace = "default" )
const (
ErrCredentialNotRetrieved = "Credentials are not retrieved from referenced Provider"
)
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" json:"accessKeyID,omitempty"`
AccessKeySecret string `yaml:"accessKeySecret" json:"accessKeySecret,omitempty"`
SecurityToken string `yaml:"securityToken" json:"securityToken,omitempty"`
}
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 HuaWeiCloudCredentials ¶ added in v0.6.0
type HuaWeiCloudCredentials struct {
AccessKey string `yaml:"accessKey"`
SecretKey string `yaml:"secretKey"`
}
HuaWeiCloudCredentials are credentials for Huawei Cloud
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