infrastructure

package
v0.0.0-...-a79603b Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TerraformerPurpose is a constant for the complete Terraform setup with purpose 'infrastructure'.
	TerraformerPurpose = "infra"
	// TerraformOutputKeyNetworkName is the private worker network.
	TerraformOutputKeyNetworkName = "network_name"
	// TerraformOutputKeyEdgeName is the name of edge gateway.
	TerraformOutputKeyEdgeName = "edge_name"
	// TerraformOutputKeyGwIP is the IP of the Gateway CIDR IP for worker.
	TerraformOutputKeyGwIP = "gw_ip"
	// MaxApiCallRetries sets the maximum retries for failed requests.
	MaxApiCallRetries = "10"
)

Variables

View Source
var StatusTypeMeta = metav1.TypeMeta{
	APIVersion: apiv1alpha1.SchemeGroupVersion.String(),
	Kind:       "InfrastructureStatus",
}

StatusTypeMeta is the TypeMeta of the vCloud InfrastructureStatus

Functions

func ComputeStatus

ComputeStatus computes the status based on the Terraformer and the given InfrastructureConfig.

func ComputeTerraformerTemplateValues

func ComputeTerraformerTemplateValues(
	infra *extensionsv1alpha1.Infrastructure,
	config *api.InfrastructureConfig,
	cluster *controller.Cluster,
) (map[string]interface{}, error)

ComputeTerraformerTemplateValues computes the values for the OpenStack Terraformer chart.

func StatusFromTerraformState

func StatusFromTerraformState(state *TerraformState) *apiv1alpha1.InfrastructureStatus

StatusFromTerraformState computes an InfrastructureStatus from the given Terraform variables.

Types

type TerraformFiles

type TerraformFiles struct {
	Main      string
	Variables string
	TFVars    []byte
}

TerraformFiles are the files that have been rendered from the infrastructure chart.

func RenderTerraformerTemplate

func RenderTerraformerTemplate(
	infra *extensionsv1alpha1.Infrastructure,
	config *api.InfrastructureConfig,
	cluster *controller.Cluster,
) (*TerraformFiles, error)

RenderTerraformerTemplate renders the openstack infrastructure templates with the given values.

type TerraformState

type TerraformState struct {
	// NetworkName is the private worker network.
	NetworkName string
	// EdgeName is the name the of edge gateway.
	EdgeName string
	// GwIP is IP of gateway CIDR IP for workers.
	GwIP string
}

TerraformState is the Terraform state for an infrastructure.

func ExtractTerraformState

func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer) (*TerraformState, error)

ExtractTerraformState extracts the TerraformState from the given Terraformer.

Jump to

Keyboard shortcuts

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