Documentation ¶
Index ¶
- Constants
- func DecompressTerraformStateSecret(data string) ([]byte, error)
- func GetProviderCredentials(ctx context.Context, k8sClient client.Client, namespace, providerName string) (map[string]string, error)
- func GetProviderFromConfiguration(ctx context.Context, k8sClient client.Client, namespace, providerName string) (*v1beta1.Provider, error)
- func RawExtension2Map(raw *runtime.RawExtension) (map[string]interface{}, error)
- func RenderTemplate(backend *v1beta1.Backend, namespace string) (string, error)
- func ValidateProviderCredentials(ctx context.Context, k8sClient client.Client, provider *v1beta1.Provider) error
- type AWSCredentials
- type AlibabaCloudCredentials
- type AzureCredentials
- type CloudProvider
- type ECCredentials
- type GCPCredentials
- type VSphereCredentials
Constants ¶
const ( // ProviderName is the name of Provider object ProviderName = "default" // ProviderNamespace is the namespace of Provider object ProviderNamespace = "default" )
Variables ¶
This section is empty.
Functions ¶
func DecompressTerraformStateSecret ¶ added in v0.1.3
DecompressTerraformStateSecret decompress the data of Terraform backend state secret Modified based on Hashicorp code base https://github.com/hashicorp/terraform/blob/fabdf0bea1fa2bf6a9d56cc3ea0f28242bf5e812/backend/remote-state/kubernetes/client.go#L355 Licensed under Mozilla Public License 2.0
func GetProviderCredentials ¶
func GetProviderCredentials(ctx context.Context, k8sClient client.Client, namespace, providerName string) (map[string]string, error)
GetProviderCredentials gets provider credentials by cloud provider name
func GetProviderFromConfiguration ¶ added in v0.1.18
func GetProviderFromConfiguration(ctx context.Context, k8sClient client.Client, namespace, providerName string) (*v1beta1.Provider, error)
GetProviderFromConfiguration gets provider object from Configuration
func RawExtension2Map ¶
func RawExtension2Map(raw *runtime.RawExtension) (map[string]interface{}, error)
RawExtension2Map will convert rawExtension to map This function is copied from oam-dev/kubevela
func RenderTemplate ¶ added in v0.1.18
RenderTemplate renders Backend template
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 ¶ added in v0.1.8
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 ECCredentials ¶ added in v0.1.17
type ECCredentials struct {
ECApiKey string `yaml:"ecApiKey"`
}
ECCredentials are credentials for Elastic CLoud
type GCPCredentials ¶ added in v0.1.8
type GCPCredentials struct { GCPCredentialsJSON string `yaml:"gcpCredentialsJSON"` GCPProject string `yaml:"gcpProject"` }
GCPCredentials are credentials for GCP
type VSphereCredentials ¶ added in v0.1.9
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