Documentation ¶
Index ¶
- Constants
- Variables
- func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastructure) (*openstackv1alpha1.InfrastructureConfig, error)
- func NewTerraformer(restConfig *rest.Config, creds *Credentials, purpose, namespace, name string) (*terraformer.Terraformer, error)
- func TerraformerVariablesEnvironmentFromCredentials(creds *Credentials) map[string]string
- type Credentials
- func ExtractCredentials(secret *corev1.Secret) (*Credentials, error)
- func GetCredentials(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (*Credentials, error)
- func GetCredentialsForNamespaceAndName(ctx context.Context, c client.Client, namespace, name string) (*Credentials, error)
Constants ¶
const ( // TerraformVarNameUserName maps to terraform internal var representation. TerraformVarNameUserName = "TF_VAR_USER_NAME" // TerraformVarNamePassword maps to terraform internal var representation. TerraformVarNamePassword = "TF_VAR_PASSWORD" )
Variables ¶
var ( // Scheme is a scheme with the types relevant for OpenStack actuators. Scheme *runtime.Scheme )
Functions ¶
func InfrastructureConfigFromInfrastructure ¶
func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastructure) (*openstackv1alpha1.InfrastructureConfig, error)
InfrastructureConfigFromInfrastructure extracts the InfrastructureConfig from the ProviderConfig section of the given Infrastructure.
func NewTerraformer ¶
func NewTerraformer( restConfig *rest.Config, creds *Credentials, purpose, namespace, name string, ) (*terraformer.Terraformer, error)
NewTerraformer initializes a new Terraformer that has the credentials.
func TerraformerVariablesEnvironmentFromCredentials ¶
func TerraformerVariablesEnvironmentFromCredentials(creds *Credentials) map[string]string
TerraformerVariablesEnvironmentFromCredentials computes the Terraformer variables environment from the given Credentials.
Types ¶
type Credentials ¶
Credentials contains the necessary OpenStack credential information.
func ExtractCredentials ¶
func ExtractCredentials(secret *corev1.Secret) (*Credentials, error)
ExtractCredentials generates a credentials object for a given provider secret.
func GetCredentials ¶
func GetCredentials(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (*Credentials, error)
GetCredentials computes for a given context and infrastructure the corresponding credentials object.
func GetCredentialsForNamespaceAndName ¶
func GetCredentialsForNamespaceAndName(ctx context.Context, c client.Client, namespace, name string) (*Credentials, error)
GetCredentialsForNamespaceAndName computes for a given context and namespace and name the corresponding credentials object.