mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
This parameter is not used by the installer and completely ignored during the installation, so it just confuses users and should be removed. The real region value is taken from clouds.yaml file.
40 lines
1.6 KiB
Go
40 lines
1.6 KiB
Go
// Package openstack contains OpenStack-specific Terraform-variable logic.
|
|
package openstack
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"sigs.k8s.io/cluster-api-provider-openstack/pkg/apis/openstackproviderconfig/v1alpha1"
|
|
)
|
|
|
|
type config struct {
|
|
BaseImage string `json:"openstack_base_image,omitempty"`
|
|
ExternalNetwork string `json:"openstack_external_network,omitempty"`
|
|
Cloud string `json:"openstack_credentials_cloud,omitempty"`
|
|
FlavorName string `json:"openstack_master_flavor_name,omitempty"`
|
|
LbFloatingIP string `json:"openstack_lb_floating_ip,omitempty"`
|
|
APIVIP string `json:"openstack_api_int_ip,omitempty"`
|
|
DNSVIP string `json:"openstack_node_dns_ip,omitempty"`
|
|
IngressVIP string `json:"openstack_ingress_ip,omitempty"`
|
|
TrunkSupport string `json:"openstack_trunk_support,omitempty"`
|
|
OctaviaSupport string `json:"openstack_octavia_support,omitempty"`
|
|
}
|
|
|
|
// TFVars generates OpenStack-specific Terraform variables.
|
|
func TFVars(masterConfig *v1alpha1.OpenstackProviderSpec, cloud string, externalNetwork string, lbFloatingIP string, apiVIP string, dnsVIP string, ingressVIP string, trunkSupport string, octaviaSupport string) ([]byte, error) {
|
|
cfg := &config{
|
|
BaseImage: masterConfig.Image,
|
|
ExternalNetwork: externalNetwork,
|
|
Cloud: cloud,
|
|
FlavorName: masterConfig.Flavor,
|
|
LbFloatingIP: lbFloatingIP,
|
|
APIVIP: apiVIP,
|
|
DNSVIP: dnsVIP,
|
|
IngressVIP: ingressVIP,
|
|
TrunkSupport: trunkSupport,
|
|
OctaviaSupport: octaviaSupport,
|
|
}
|
|
|
|
return json.MarshalIndent(cfg, "", " ")
|
|
}
|