diff --git a/data/data/openstack/bootstrap/main.tf b/data/data/openstack/bootstrap/main.tf index 2de72429f2c..a0c32f9a554 100644 --- a/data/data/openstack/bootstrap/main.tf +++ b/data/data/openstack/bootstrap/main.tf @@ -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] } diff --git a/data/data/openstack/bootstrap/variables.tf b/data/data/openstack/bootstrap/variables.tf index b0750ee8324..190496a0758 100644 --- a/data/data/openstack/bootstrap/variables.tf +++ b/data/data/openstack/bootstrap/variables.tf @@ -39,10 +39,6 @@ variable "api_int_ip" { type = string } -variable "node_dns_ip" { - type = string -} - variable "external_network" { type = string } diff --git a/data/data/openstack/main.tf b/data/data/openstack/main.tf index e43085b581d..3fa793201dc 100644 --- a/data/data/openstack/main.tf +++ b/data/data/openstack/main.tf @@ -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 @@ -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 diff --git a/data/data/openstack/topology/private-network.tf b/data/data/openstack/topology/private-network.tf index eb70e63b71b..93a7b252ea2 100644 --- a/data/data/openstack/topology/private-network.tf +++ b/data/data/openstack/topology/private-network.tf @@ -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 } diff --git a/data/data/openstack/topology/variables.tf b/data/data/openstack/topology/variables.tf index ba3e21ab313..1ae8ab5bd19 100644 --- a/data/data/openstack/topology/variables.tf +++ b/data/data/openstack/topology/variables.tf @@ -37,10 +37,6 @@ variable "api_int_ip" { type = string } -variable "node_dns_ip" { - type = string -} - variable "ingress_ip" { type = string } diff --git a/data/data/openstack/variables-openstack.tf b/data/data/openstack/variables-openstack.tf index 63d2fa7d9e5..107a52a9a00 100644 --- a/data/data/openstack/variables-openstack.tf +++ b/data/data/openstack/variables-openstack.tf @@ -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." diff --git a/pkg/asset/cluster/tfvars.go b/pkg/asset/cluster/tfvars.go index 223eb93fbe1..0f15e583273 100644 --- a/pkg/asset/cluster/tfvars.go +++ b/pkg/asset/cluster/tfvars.go @@ -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" ) @@ -375,10 +374,6 @@ 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, @@ -386,7 +381,6 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error { 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, diff --git a/pkg/asset/manifests/infrastructure.go b/pkg/asset/manifests/infrastructure.go index cbcccd22a74..25887212498 100644 --- a/pkg/asset/manifests/infrastructure.go +++ b/pkg/asset/manifests/infrastructure.go @@ -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" ) @@ -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: diff --git a/pkg/tfvars/openstack/openstack.go b/pkg/tfvars/openstack/openstack.go index 8d3fcac5d6e..4dea6a27da8 100644 --- a/pkg/tfvars/openstack/openstack.go +++ b/pkg/tfvars/openstack/openstack.go @@ -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"` @@ -44,7 +43,7 @@ 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, @@ -52,7 +51,6 @@ func TFVars(masterConfig *v1alpha1.OpenstackProviderSpec, cloud string, external FlavorName: masterConfig.Flavor, LbFloatingIP: lbFloatingIP, APIVIP: apiVIP, - DNSVIP: dnsVIP, IngressVIP: ingressVIP, ExternalDNS: externalDNS, TrunkSupport: trunkSupport, diff --git a/pkg/types/openstack/defaults/platform.go b/pkg/types/openstack/defaults/platform.go index 4ea513e7f1d..5d2727984ba 100644 --- a/pkg/types/openstack/defaults/platform.go +++ b/pkg/types/openstack/defaults/platform.go @@ -1,7 +1,6 @@ package defaults import ( - "net" "os" "github.com/apparentlymart/go-cidr/cidr" @@ -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) -}