Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeStatus(ctx context.Context, tf terraformer.Terraformer, ...) (*apiv1alpha1.InfrastructureStatus, error)
- func ComputeTerraformerTemplateValues(infra *extensionsv1alpha1.Infrastructure, config *api.InfrastructureConfig, ...) (map[string]interface{}, error)
- func StatusFromTerraformState(state *TerraformState) *apiv1alpha1.InfrastructureStatus
- type TerraformFiles
- type TerraformState
Constants ¶
View Source
const ( // TerraformerPurpose is a constant for the complete Terraform setup with purpose 'infrastructure'. TerraformerPurpose = "infra" // TerraformOutputKeySSHKeyName key for accessing SSH key name from outputs in terraform TerraformOutputKeySSHKeyName = "key_name" // TerraformOutputKeyRouterID is the id the router between provider network and the worker subnet. TerraformOutputKeyRouterID = "router_id" // TerraformOutputKeyNetworkID is the private worker network. TerraformOutputKeyNetworkID = "network_id" // TerraformOutputKeySecurityGroupID is the id of worker security group. TerraformOutputKeySecurityGroupID = "security_group_id" // TerraformOutputKeySecurityGroupName is the name of the worker security group. TerraformOutputKeySecurityGroupName = "security_group_name" // TerraformOutputKeyFloatingNetworkID is the id of the provider network. TerraformOutputKeyFloatingNetworkID = "floating_network_id" // TerraformOutputKeySubnetID is the id of the worker subnet. TerraformOutputKeySubnetID = "subnet_id" // DefaultRouterID is the computed router ID as generated by terraform. DefaultRouterID = "openstack_networking_router_v2.router.id" // 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 GCP InfrastructureStatus
Functions ¶
func ComputeStatus ¶
func ComputeStatus(ctx context.Context, tf terraformer.Terraformer, config *api.InfrastructureConfig) (*apiv1alpha1.InfrastructureStatus, error)
ComputeStatus computes the status based on the Terraformer and the given InfrastructureConfig.
func ComputeTerraformerTemplateValues ¶ added in v1.20.0
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 ¶
TerraformFiles are the files that have been rendered from the infrastructure chart.
func RenderTerraformerTemplate ¶ added in v1.20.0
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 { // SSHKeyName key for accessing SSH key name from outputs in terraform SSHKeyName string // RouterID is the id the router between provider network and the worker subnet. RouterID string // NetworkID is the private worker network. NetworkID string // SubnetID is the id of the worker subnet. SubnetID string // FloatingNetworkID is the id of the provider network. FloatingNetworkID string // SecurityGroupID is the id of worker security group. SecurityGroupID string // SecurityGroupName is the name of the worker security group. SecurityGroupName 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.
Click to show internal directories.
Click to hide internal directories.