Skip to content

Commit

Permalink
do not apply floating IP's before router port is created (kubernetes-…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Blom authored and LuckySB committed Jan 16, 2021
1 parent 6eac1cd commit 19c585e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/terraform/openstack/kubespray.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module "ips" {
router_id = module.network.router_id
k8s_nodes = var.k8s_nodes
k8s_master_fips = var.k8s_master_fips
router_internal_port_id = module.network.router_internal_port_id
}

module "compute" {
Expand Down
3 changes: 3 additions & 0 deletions contrib/terraform/openstack/modules/ips/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ resource "null_resource" "dummy_dependency" {
triggers = {
dependency_id = var.router_id
}
depends_on = [
var.router_internal_port_id
]
}

# If user specifies pre-existing IPs to use in k8s_master_fips, do not create new ones.
Expand Down
2 changes: 2 additions & 0 deletions contrib/terraform/openstack/modules/ips/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ variable "router_id" {
variable "k8s_nodes" {}

variable "k8s_master_fips" {}

variable "router_internal_port_id" {}
5 changes: 5 additions & 0 deletions contrib/terraform/openstack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ variable "router_id" {
default = null
}

variable "router_internal_port_id" {
description = "uuid of the port connection our router to our network"
default = null
}

variable "k8s_nodes" {
default = {}
}
Expand Down

0 comments on commit 19c585e

Please sign in to comment.