Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions data/data/openstack/bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ resource "openstack_networking_port_v2" "bootstrap_port" {
ip_address = var.api_int_ip
}

allowed_address_pairs {
ip_address = var.node_dns_ip
}

depends_on = [var.master_port_ids]
}

Expand Down
4 changes: 0 additions & 4 deletions data/data/openstack/bootstrap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ variable "api_int_ip" {
type = string
}

variable "node_dns_ip" {
type = string
}

variable "external_network" {
type = string
}
Expand Down
2 changes: 0 additions & 2 deletions data/data/openstack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module "bootstrap" {
flavor_name = var.openstack_master_flavor_name
ignition = var.ignition_bootstrap
api_int_ip = var.openstack_api_int_ip
node_dns_ip = var.openstack_node_dns_ip
external_network = var.openstack_external_network
cluster_domain = var.cluster_domain
nodes_subnet_id = module.topology.nodes_subnet_id
Expand Down Expand Up @@ -73,7 +72,6 @@ module "topology" {
masters_count = var.master_count
lb_floating_ip = var.openstack_lb_floating_ip
api_int_ip = var.openstack_api_int_ip
node_dns_ip = var.openstack_node_dns_ip
ingress_ip = var.openstack_ingress_ip
external_dns = var.openstack_external_dns
trunk_support = var.openstack_trunk_support
Expand Down
4 changes: 0 additions & 4 deletions data/data/openstack/topology/private-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ resource "openstack_networking_port_v2" "masters" {
ip_address = var.api_int_ip
}

allowed_address_pairs {
ip_address = var.node_dns_ip
}

allowed_address_pairs {
ip_address = var.ingress_ip
}
Expand Down
4 changes: 0 additions & 4 deletions data/data/openstack/topology/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ variable "api_int_ip" {
type = string
}

variable "node_dns_ip" {
type = string
}

variable "ingress_ip" {
type = string
}
Expand Down
5 changes: 0 additions & 5 deletions data/data/openstack/variables-openstack.tf
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,6 @@ variable "openstack_api_int_ip" {
description = "IP on the node subnet reserved for api-int VIP."
}

variable "openstack_node_dns_ip" {
type = string
description = "IP on the nodes subnet reserved for node dns VIP."
}

variable "openstack_ingress_ip" {
type = string
description = "IP on the nodes subnet reserved for the ingress VIP."
Expand Down
6 changes: 0 additions & 6 deletions pkg/asset/cluster/tfvars.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import (
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/openstack"
openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults"
"github.com/openshift/installer/pkg/types/ovirt"
"github.com/openshift/installer/pkg/types/vsphere"
)
Expand Down Expand Up @@ -375,18 +374,13 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error {
if err != nil {
return err
}
dnsVIP, err := openstackdefaults.DNSVIP(installConfig.Config.Networking)
if err != nil {
return err
}
data, err = openstacktfvars.TFVars(
masters[0].Spec.ProviderSpec.Value.Object.(*openstackprovider.OpenstackProviderSpec),
installConfig.Config.Platform.OpenStack.Cloud,
installConfig.Config.Platform.OpenStack.ExternalNetwork,
installConfig.Config.Platform.OpenStack.ExternalDNS,
installConfig.Config.Platform.OpenStack.LbFloatingIP,
installConfig.Config.Platform.OpenStack.APIVIP,
dnsVIP.String(),
installConfig.Config.Platform.OpenStack.IngressVIP,
installConfig.Config.Platform.OpenStack.TrunkSupport,
installConfig.Config.Platform.OpenStack.OctaviaSupport,
Expand Down
6 changes: 0 additions & 6 deletions pkg/asset/manifests/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/openstack"
openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults"
"github.com/openshift/installer/pkg/types/ovirt"
"github.com/openshift/installer/pkg/types/vsphere"
)
Expand Down Expand Up @@ -144,13 +143,8 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
config.Spec.PlatformSpec.Type = configv1.NonePlatformType
case openstack.Name:
config.Spec.PlatformSpec.Type = configv1.OpenStackPlatformType
dnsVIP, err := openstackdefaults.DNSVIP(installConfig.Config.Networking)
if err != nil {
return err
}
config.Status.PlatformStatus.OpenStack = &configv1.OpenStackPlatformStatus{
APIServerInternalIP: installConfig.Config.OpenStack.APIVIP,
NodeDNSIP: dnsVIP.String(),
IngressIP: installConfig.Config.OpenStack.IngressVIP,
}
case vsphere.Name:
Expand Down
4 changes: 1 addition & 3 deletions pkg/tfvars/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type config struct {
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"`
Expand All @@ -44,15 +43,14 @@ type config struct {
}

// TFVars generates OpenStack-specific Terraform variables.
func TFVars(masterConfig *v1alpha1.OpenstackProviderSpec, cloud string, externalNetwork string, externalDNS []string, lbFloatingIP string, apiVIP string, dnsVIP string, ingressVIP string, trunkSupport string, octaviaSupport string, baseImage string, infraID string, userCA string, bootstrapIgn string, mpool *types_openstack.MachinePool, machinesSubnet string) ([]byte, error) {
func TFVars(masterConfig *v1alpha1.OpenstackProviderSpec, cloud string, externalNetwork string, externalDNS []string, lbFloatingIP string, apiVIP string, ingressVIP string, trunkSupport string, octaviaSupport string, baseImage string, infraID string, userCA string, bootstrapIgn string, mpool *types_openstack.MachinePool, machinesSubnet string) ([]byte, error) {

cfg := &config{
ExternalNetwork: externalNetwork,
Cloud: cloud,
FlavorName: masterConfig.Flavor,
LbFloatingIP: lbFloatingIP,
APIVIP: apiVIP,
DNSVIP: dnsVIP,
IngressVIP: ingressVIP,
ExternalDNS: externalDNS,
TrunkSupport: trunkSupport,
Expand Down
9 changes: 0 additions & 9 deletions pkg/types/openstack/defaults/platform.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package defaults

import (
"net"
"os"

"github.com/apparentlymart/go-cidr/cidr"
Expand Down Expand Up @@ -42,11 +41,3 @@ func SetPlatformDefaults(p *openstack.Platform, n *types.Networking) {
p.IngressVIP = vip.String()
}
}

// DNSVIP returns the internal virtual IP address (VIP) put in front
// of the DNS static pods running on the nodes. Unlike the DNS
// operator these services provide name resolution for the nodes
// themselves.
func DNSVIP(networking *types.Networking) (net.IP, error) {
return cidr.Host(&networking.MachineNetwork[0].CIDR.IPNet, 6)
}