Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupKubernetesRoutes(ctx context.Context, client openstackclient.Networking, ...) error
- 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
- func WorkersCIDR(config *openstack.InfrastructureConfig) string
- type TerraformFiles
- type TerraformState
Constants ¶
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" // TerraformOutputKeyRouterIP is the ip address of the router. TerraformOutputKeyRouterIP = "router_ip" // TerraformOutputKeyNetworkID is the private worker network. TerraformOutputKeyNetworkID = "network_id" // TerraformOutputKeyNetworkName is the private worker network name. TerraformOutputKeyNetworkName = "network_name" // 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" TerraformOutputKeyShareNetworkID = "share_network_id" TerraformOutputKeyShareNetworkName = "share_network_name" // 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 ¶
var StatusTypeMeta = metav1.TypeMeta{ APIVersion: apiv1alpha1.SchemeGroupVersion.String(), Kind: "InfrastructureStatus", }
StatusTypeMeta is the TypeMeta of the GCP InfrastructureStatus
Functions ¶
func CleanupKubernetesRoutes ¶ added in v1.30.2
func CleanupKubernetesRoutes(ctx context.Context, client openstackclient.Networking, routerID, workers string) error
CleanupKubernetesRoutes deletes all routes from the router which have a nextHop in the subnet.
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.
func WorkersCIDR ¶ added in v1.30.3
func WorkersCIDR(config *openstack.InfrastructureConfig) string
WorkersCIDR determines the Workers CIDR from the given InfrastructureConfig.
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 // RouterIP is the ip address of the router. RouterIP string // NetworkID is the private worker network. NetworkID string // NetworkName is the private worker network name. NetworkName 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 ShareNetworkID string ShareNetworkName string }
TerraformState is the Terraform state for an infrastructure.
func ExtractTerraformState ¶
func ExtractTerraformState(ctx context.Context, tf terraformer.Terraformer, config *api.InfrastructureConfig) (*TerraformState, error)
ExtractTerraformState extracts the TerraformState from the given Terraformer.