infrastructure

package
v0.0.0-...-6c6f41e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TerraformerPurpose is the terraformer infrastructure purpose.
	TerraformerPurpose = "infra"

	// TerraformerOutputKeyResourceGroupName is the key for the resourceGroupName output
	TerraformerOutputKeyResourceGroupName = "resourceGroupName"
	// TerraformerOutputKeyVNetName is the key for the vnetName output
	TerraformerOutputKeyVNetName = "vnetName"
	// TerraformerOutputKeySubnetName is the key for the subnetName output
	TerraformerOutputKeySubnetName = "subnetName"
	// TerraformerOutputKeyAvailabilitySetID is the key for the availabilitySetID output
	TerraformerOutputKeyAvailabilitySetID = "availabilitySetID"
	// TerraformerOutputKeyAvailabilitySetName is the key for the availabilitySetName output
	TerraformerOutputKeyAvailabilitySetName = "availabilitySetName"
	// TerraformerOutputKeyRouteTableName is the key for the routeTableName output
	TerraformerOutputKeyRouteTableName = "routeTableName"
	// TerraformerOutputKeySecurityGroupName is the key for the securityGroupName output
	TerraformerOutputKeySecurityGroupName = "securityGroupName"
)

Variables

View Source
var (
	// ChartsPath is the path to the charts
	ChartsPath = filepath.Join("controllers", "provider-azure", "charts")
	// InternalChartsPath is the path to the internal charts
	InternalChartsPath = filepath.Join(ChartsPath, "internal")

	// StatusTypeMeta is the TypeMeta of the Azure InfrastructureStatus
	StatusTypeMeta = metav1.TypeMeta{
		APIVersion: azurev1alpha1.SchemeGroupVersion.String(),
		Kind:       "InfrastructureStatus",
	}
)

Functions

func ComputeStatus

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

func ComputeTerraformerChartValues

func ComputeTerraformerChartValues(infra *extensionsv1alpha1.Infrastructure, clientAuth *internal.ClientAuth,
	config *azurev1alpha1.InfrastructureConfig, cluster *controller.Cluster) (map[string]interface{}, error)

ComputeTerraformerChartValues computes the values for the Azure Terraformer chart.

func GetClientAuthFromInfrastructure

func GetClientAuthFromInfrastructure(ctx context.Context, c client.Client, config *extensionsv1alpha1.Infrastructure) (*internal.ClientAuth, error)

GetClientAuthFromInfrastructure retrieves the ServiceAccount from the Secret referenced in the given Infrastructure.

func StatusFromTerraformState

func StatusFromTerraformState(state *TerraformState) *azurev1alpha1.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 RenderTerraformerChart

func RenderTerraformerChart(renderer chartrenderer.Interface, infra *extensionsv1alpha1.Infrastructure, clientAuth *internal.ClientAuth,
	config *azurev1alpha1.InfrastructureConfig, cluster *controller.Cluster) (*TerraformFiles, error)

RenderTerraformerChart renders the azure-infra chart with the given values.

type TerraformState

type TerraformState struct {
	// VPCName is the name of the VNet created for an infrastructure.
	VNetName string
	// ResourceGroupName is the name of the resource group.
	ResourceGroupName string
	// AvailabilitySetID is the ID for the created availability set.
	AvailabilitySetID string
	// AvailabilitySetName the ID for the created availability set .
	AvailabilitySetName string
	// SubnetName is the name of the created subnet.
	SubnetName string
	// RouteTableName is the name of the route table.
	RouteTableName string
	// SecurityGroupName is the name of the security group.
	SecurityGroupName string
}

TerraformState is the Terraform state for an infrastructure.

func ExtractTerraformState

func ExtractTerraformState(tf *terraformer.Terraformer, config *azurev1alpha1.InfrastructureConfig) (*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