Fix some typos and comment out some unused parts for now.
This commit is contained in:
parent
8f70f4a3ff
commit
f59ab71fe6
|
@ -13,7 +13,7 @@ locals {
|
||||||
#
|
#
|
||||||
|
|
||||||
resource "openstack_networking_port_v2" "kubecport-dco" {
|
resource "openstack_networking_port_v2" "kubecport-dco" {
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dc}-port"
|
name = "${var.controller_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-port"
|
||||||
# We create as many ports as there are instances created
|
# We create as many ports as there are instances created
|
||||||
count = var.controllerdcreplicas
|
count = var.controllerdcreplicas
|
||||||
network_id = data.openstack_networking_network_v2.public-dco.id
|
network_id = data.openstack_networking_network_v2.public-dco.id
|
||||||
|
@ -28,9 +28,9 @@ resource "openstack_networking_port_v2" "kubecport-dco" {
|
||||||
|
|
||||||
# Boot volume for node
|
# Boot volume for node
|
||||||
resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-dco" {
|
resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-dco" {
|
||||||
count = var.workerdcreplicas # Replicas per datacenter
|
count = var.controllerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dc}-vol"
|
name = "${var.controller_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-vol"
|
||||||
description = "OS volume for kubernetes worker node ${count.index * local.indexjump + 1 + local.nodenrbase}"
|
description = "OS volume for kubernetes worker node ${count.index * local.dcoindexjump + 1 + local.dconodenrbase}"
|
||||||
size = 100
|
size = 100
|
||||||
image_id = data.openstack_images_image_v2.debian12image-dco.id
|
image_id = data.openstack_images_image_v2.debian12image-dco.id
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
@ -39,7 +39,7 @@ resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-dco" {
|
||||||
|
|
||||||
resource "openstack_compute_instance_v2" "controller-nodes-dco" {
|
resource "openstack_compute_instance_v2" "controller-nodes-dco" {
|
||||||
count = var.controllerdcreplicas # Replicas per datacenter
|
count = var.controllerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}.${var.dns_suffix}"
|
name = "${var.controller_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}.${var.dns_suffix}"
|
||||||
flavor_name = "${var.controller_instance_type}"
|
flavor_name = "${var.controller_instance_type}"
|
||||||
key_pair = "${var.keynameworkers}"
|
key_pair = "${var.keynameworkers}"
|
||||||
provider = openstack.dco
|
provider = openstack.dco
|
||||||
|
@ -84,7 +84,7 @@ resource "openstack_networking_port_v2" "kubewport-dco" {
|
||||||
# Boot volume for node
|
# Boot volume for node
|
||||||
resource "openstack_blockstorage_volume_v3" "kubewvolumeboot-dco" {
|
resource "openstack_blockstorage_volume_v3" "kubewvolumeboot-dco" {
|
||||||
count = var.workerdcreplicas # Replicas per datacenter
|
count = var.workerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-vol"
|
name = "${var.worker_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-vol"
|
||||||
description = "OS volume for kubernetes worker node ${count.index * local.dcoindexjump + 1 + local.dconodenrbase}"
|
description = "OS volume for kubernetes worker node ${count.index * local.dcoindexjump + 1 + local.dconodenrbase}"
|
||||||
size = 100
|
size = 100
|
||||||
image_id = data.openstack_images_image_v2.debian12image-dco.id
|
image_id = data.openstack_images_image_v2.debian12image-dco.id
|
||||||
|
@ -94,7 +94,7 @@ resource "openstack_blockstorage_volume_v3" "kubewvolumeboot-dco" {
|
||||||
|
|
||||||
resource "openstack_blockstorage_volume_v3" "kubewvolumerook-dco" {
|
resource "openstack_blockstorage_volume_v3" "kubewvolumerook-dco" {
|
||||||
count = var.workerdcreplicas # Replicas per datacenter
|
count = var.workerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-rook-vol"
|
name = "${var.worker_name}${count.index * local.dcoindexjump + 1 + local.dconodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dcodc}-rook-vol"
|
||||||
description = "Rook storage volume for kubernetes worker node ${count.index * local.dcoindexjump + 1 + local.dconodenrbase}"
|
description = "Rook storage volume for kubernetes worker node ${count.index * local.dcoindexjump + 1 + local.dconodenrbase}"
|
||||||
size = 100
|
size = 100
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
@ -108,7 +108,7 @@ resource "openstack_compute_instance_v2" "worker-nodes-dco" {
|
||||||
key_pair = "${var.keynameworkers}"
|
key_pair = "${var.keynameworkers}"
|
||||||
provider = openstack.dco
|
provider = openstack.dco
|
||||||
security_groups = [
|
security_groups = [
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-dco.id,
|
resource.openstack_networking_secgroup_v2.microk8s-dco.name,
|
||||||
resource.openstack_networking_secgroup_v2.ssh-from-jump-hosts-dco.name
|
resource.openstack_networking_secgroup_v2.ssh-from-jump-hosts-dco.name
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ locals {
|
||||||
#
|
#
|
||||||
|
|
||||||
resource "openstack_networking_port_v2" "kubecport-sto3" {
|
resource "openstack_networking_port_v2" "kubecport-sto3" {
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dc}-port"
|
name = "${var.controller_name}${count.index * local.sto3indexjump + 1 + local.sto3nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.sto3dc}-port"
|
||||||
# We create as many ports as there are instances created
|
# We create as many ports as there are instances created
|
||||||
count = var.controllerdcreplicas
|
count = var.controllerdcreplicas
|
||||||
network_id = data.openstack_networking_network_v2.public-sto3.id
|
network_id = data.openstack_networking_network_v2.public-sto3.id
|
||||||
|
@ -29,8 +29,8 @@ resource "openstack_networking_port_v2" "kubecport-sto3" {
|
||||||
# Boot volume for node
|
# Boot volume for node
|
||||||
resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-sto3" {
|
resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-sto3" {
|
||||||
count = var.workerdcreplicas # Replicas per datacenter
|
count = var.workerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.dc}-vol"
|
name = "${var.controller_name}${count.index * local.sto3indexjump + 1 + local.sto3nodenrbase}-${replace(var.dns_suffix,".","-")}-${local.sto3dc}-vol"
|
||||||
description = "OS volume for kubernetes worker node ${count.index * local.indexjump + 1 + local.nodenrbase}"
|
description = "OS volume for kubernetes worker node ${count.index * local.sto3indexjump + 1 + local.sto3nodenrbase}"
|
||||||
size = 100
|
size = 100
|
||||||
image_id = data.openstack_images_image_v2.debian12image-sto3.id
|
image_id = data.openstack_images_image_v2.debian12image-sto3.id
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
@ -39,7 +39,7 @@ resource "openstack_blockstorage_volume_v3" "kubecvolumeboot-sto3" {
|
||||||
|
|
||||||
resource "openstack_compute_instance_v2" "controller-nodes-sto3" {
|
resource "openstack_compute_instance_v2" "controller-nodes-sto3" {
|
||||||
count = var.controllerdcreplicas # Replicas per datacenter
|
count = var.controllerdcreplicas # Replicas per datacenter
|
||||||
name = "${var.controller_name}${count.index * local.indexjump + 1 + local.nodenrbase}.${var.dns_suffix}"
|
name = "${var.controller_name}${count.index * local.sto3indexjump + 1 + local.sto3nodenrbase}.${var.dns_suffix}"
|
||||||
flavor_name = "${var.controller_instance_type}"
|
flavor_name = "${var.controller_instance_type}"
|
||||||
key_pair = "${var.keynameworkers}"
|
key_pair = "${var.keynameworkers}"
|
||||||
provider = openstack.sto3
|
provider = openstack.sto3
|
||||||
|
|
|
@ -3,121 +3,121 @@
|
||||||
# Controller node resources
|
# Controller node resources
|
||||||
#
|
#
|
||||||
|
|
||||||
resource "openstack_networking_port_v2" "kubecport" {
|
#resource "openstack_networking_port_v2" "kubecport" {
|
||||||
name = "${var.controller_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-port"
|
# name = "${var.controller_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-port"
|
||||||
# We create as many ports as there are instances created
|
# # We create as many ports as there are instances created
|
||||||
count = var.controller_instance_count
|
# count = var.controller_instance_count
|
||||||
network_id = data.openstack_networking_network_v2.public.id
|
# network_id = data.openstack_networking_network_v2.public.id
|
||||||
# A list of security group ID
|
# # A list of security group ID
|
||||||
security_group_ids = [
|
# security_group_ids = [
|
||||||
data.openstack_networking_secgroup_v2.sshfromjumphosts.id,
|
# data.openstack_networking_secgroup_v2.sshfromjumphosts.id,
|
||||||
data.openstack_networking_secgroup_v2.allegress.id,
|
# data.openstack_networking_secgroup_v2.allegress.id,
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-old.id,
|
# resource.openstack_networking_secgroup_v2.microk8s-old.id,
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-dco.id,
|
# resource.openstack_networking_secgroup_v2.microk8s-dco.id,
|
||||||
resource.openstack_networking_secgroup_v2.https.id
|
# resource.openstack_networking_secgroup_v2.https.id
|
||||||
]
|
# ]
|
||||||
admin_state_up = "true"
|
# admin_state_up = "true"
|
||||||
}
|
#}
|
||||||
|
|
||||||
resource "openstack_blockstorage_volume_v3" "kubecvolumeboot" {
|
|
||||||
count = var.controller_instance_count # size of cluster
|
|
||||||
name = "${var.controller_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-vol"
|
|
||||||
description = "OS volume for kubernetes control node ${count.index + 1}"
|
|
||||||
size = 100
|
|
||||||
image_id = data.openstack_images_image_v2.debian12image.id
|
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "openstack_compute_instance_v2" "controller-nodes" {
|
|
||||||
count = var.controller_instance_count
|
|
||||||
name = "${var.controller_name}${count.index+1}.${var.dns_suffix}"
|
|
||||||
flavor_name = "${var.controller_instance_type}"
|
|
||||||
key_pair = "${var.keyname}"
|
|
||||||
security_groups = [
|
|
||||||
data.openstack_networking_secgroup_v2.sshfromjumphosts.name,
|
|
||||||
data.openstack_networking_secgroup_v2.allegress.name,
|
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-old.id,
|
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-dco.id,
|
|
||||||
resource.openstack_networking_secgroup_v2.https.name
|
|
||||||
]
|
|
||||||
block_device {
|
|
||||||
uuid = resource.openstack_blockstorage_volume_v3.kubecvolumeboot[count.index].id
|
|
||||||
source_type = "volume"
|
|
||||||
destination_type = "volume"
|
|
||||||
boot_index = 0
|
|
||||||
}
|
|
||||||
scheduler_hints {
|
|
||||||
group = openstack_compute_servergroup_v2.controllers.id
|
|
||||||
}
|
|
||||||
network {
|
|
||||||
port = resource.openstack_networking_port_v2.kubecport[count.index].id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Worker node resources
|
#resource "openstack_blockstorage_volume_v3" "kubecvolumeboot" {
|
||||||
|
# count = var.controller_instance_count # size of cluster
|
||||||
|
# name = "${var.controller_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-vol"
|
||||||
|
# description = "OS volume for kubernetes control node ${count.index + 1}"
|
||||||
|
# size = 100
|
||||||
|
# image_id = data.openstack_images_image_v2.debian12image.id
|
||||||
|
# enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
#}
|
||||||
#
|
#
|
||||||
|
#resource "openstack_compute_instance_v2" "controller-nodes" {
|
||||||
resource "openstack_networking_port_v2" "kubewport" {
|
# count = var.controller_instance_count
|
||||||
name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-port"
|
# name = "${var.controller_name}${count.index+1}.${var.dns_suffix}"
|
||||||
# We create as many ports as there are instances created
|
# flavor_name = "${var.controller_instance_type}"
|
||||||
count = var.worker_instance_count
|
# key_pair = "${var.keyname}"
|
||||||
network_id = data.openstack_networking_network_v2.public.id
|
# security_groups = [
|
||||||
# A list of security group ID
|
# data.openstack_networking_secgroup_v2.sshfromjumphosts.name,
|
||||||
security_group_ids = [
|
# data.openstack_networking_secgroup_v2.allegress.name,
|
||||||
data.openstack_networking_secgroup_v2.sshfromjumphosts.id,
|
# resource.openstack_networking_secgroup_v2.microk8s-old.id,
|
||||||
data.openstack_networking_secgroup_v2.allegress.id,
|
# resource.openstack_networking_secgroup_v2.microk8s-dco.id,
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-old.id
|
# resource.openstack_networking_secgroup_v2.https.name
|
||||||
]
|
# ]
|
||||||
admin_state_up = "true"
|
# block_device {
|
||||||
}
|
# uuid = resource.openstack_blockstorage_volume_v3.kubecvolumeboot[count.index].id
|
||||||
|
# source_type = "volume"
|
||||||
resource "openstack_blockstorage_volume_v3" "kubewvolumeboot" {
|
# destination_type = "volume"
|
||||||
count = var.worker_instance_count # size of cluster
|
# boot_index = 0
|
||||||
name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-vol"
|
# }
|
||||||
description = "OS volume for kubernetes worker node ${count.index + 1}"
|
# scheduler_hints {
|
||||||
size = 100
|
# group = openstack_compute_servergroup_v2.controllers.id
|
||||||
image_id = data.openstack_images_image_v2.debian12image.id
|
# }
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
# network {
|
||||||
}
|
# port = resource.openstack_networking_port_v2.kubecport[count.index].id
|
||||||
|
# }
|
||||||
resource "openstack_blockstorage_volume_v3" "kubewvolumerook" {
|
#}
|
||||||
count = var.worker_instance_count # size of cluster
|
#
|
||||||
name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-rook-vol"
|
##
|
||||||
description = "Rook storage volume for kubernetes worker node ${count.index + 1}"
|
## Worker node resources
|
||||||
size = 100
|
##
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
#
|
||||||
}
|
#resource "openstack_networking_port_v2" "kubewport" {
|
||||||
|
# name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-port"
|
||||||
|
# # We create as many ports as there are instances created
|
||||||
resource "openstack_compute_instance_v2" "worker-nodes" {
|
# count = var.worker_instance_count
|
||||||
count = var.worker_instance_count
|
# network_id = data.openstack_networking_network_v2.public.id
|
||||||
name = "${var.worker_name}${count.index+1}.${var.dns_suffix}"
|
# # A list of security group ID
|
||||||
flavor_name = "${var.worker_instance_type}"
|
# security_group_ids = [
|
||||||
key_pair = "${var.keynameworkers}"
|
# data.openstack_networking_secgroup_v2.sshfromjumphosts.id,
|
||||||
security_groups = [
|
# data.openstack_networking_secgroup_v2.allegress.id,
|
||||||
data.openstack_networking_secgroup_v2.sshfromjumphosts.name,
|
# resource.openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
data.openstack_networking_secgroup_v2.allegress.name,
|
# ]
|
||||||
resource.openstack_networking_secgroup_v2.microk8s-old.name
|
# admin_state_up = "true"
|
||||||
]
|
#}
|
||||||
|
#
|
||||||
block_device {
|
#resource "openstack_blockstorage_volume_v3" "kubewvolumeboot" {
|
||||||
uuid = resource.openstack_blockstorage_volume_v3.kubewvolumeboot[count.index].id
|
# count = var.worker_instance_count # size of cluster
|
||||||
source_type = "volume"
|
# name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-vol"
|
||||||
destination_type = "volume"
|
# description = "OS volume for kubernetes worker node ${count.index + 1}"
|
||||||
boot_index = 0
|
# size = 100
|
||||||
}
|
# image_id = data.openstack_images_image_v2.debian12image.id
|
||||||
block_device {
|
# enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
uuid = resource.openstack_blockstorage_volume_v3.kubewvolumerook[count.index].id
|
#}
|
||||||
source_type = "volume"
|
#
|
||||||
destination_type = "volume"
|
#resource "openstack_blockstorage_volume_v3" "kubewvolumerook" {
|
||||||
boot_index = 1
|
# count = var.worker_instance_count # size of cluster
|
||||||
}
|
# name = "${var.worker_name}${count.index+1}-${replace(var.dns_suffix,".","-")}-rook-vol"
|
||||||
|
# description = "Rook storage volume for kubernetes worker node ${count.index + 1}"
|
||||||
scheduler_hints {
|
# size = 100
|
||||||
group = openstack_compute_servergroup_v2.workers.id
|
# enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
}
|
#}
|
||||||
network {
|
#
|
||||||
port = resource.openstack_networking_port_v2.kubewport[count.index].id
|
#
|
||||||
}
|
#resource "openstack_compute_instance_v2" "worker-nodes" {
|
||||||
}
|
# count = var.worker_instance_count
|
||||||
|
# name = "${var.worker_name}${count.index+1}.${var.dns_suffix}"
|
||||||
|
# flavor_name = "${var.worker_instance_type}"
|
||||||
|
# key_pair = "${var.keynameworkers}"
|
||||||
|
# security_groups = [
|
||||||
|
# data.openstack_networking_secgroup_v2.sshfromjumphosts.name,
|
||||||
|
# data.openstack_networking_secgroup_v2.allegress.name,
|
||||||
|
# resource.openstack_networking_secgroup_v2.microk8s-old.name
|
||||||
|
# ]
|
||||||
|
#
|
||||||
|
# block_device {
|
||||||
|
# uuid = resource.openstack_blockstorage_volume_v3.kubewvolumeboot[count.index].id
|
||||||
|
# source_type = "volume"
|
||||||
|
# destination_type = "volume"
|
||||||
|
# boot_index = 0
|
||||||
|
# }
|
||||||
|
# block_device {
|
||||||
|
# uuid = resource.openstack_blockstorage_volume_v3.kubewvolumerook[count.index].id
|
||||||
|
# source_type = "volume"
|
||||||
|
# destination_type = "volume"
|
||||||
|
# boot_index = 1
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# scheduler_hints {
|
||||||
|
# group = openstack_compute_servergroup_v2.workers.id
|
||||||
|
# }
|
||||||
|
# network {
|
||||||
|
# port = resource.openstack_networking_port_v2.kubewport[count.index].id
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
|
|
@ -105,7 +105,7 @@ resource "openstack_networking_secgroup_rule_v2" "microk8s_controller_rule_v4_st
|
||||||
protocol = var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))][keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]]
|
protocol = var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))][keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]]
|
||||||
port_range_min = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
port_range_min = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
||||||
port_range_max = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
port_range_max = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
||||||
provider = openstack.sto3
|
provider = openstack.sto4
|
||||||
remote_ip_prefix = join("/", [ resource.openstack_compute_instance_v2.controller-nodes-sto3[count.index % length(resource.openstack_compute_instance_v2.controller-nodes-sto3)].access_ip_v4, "32" ])
|
remote_ip_prefix = join("/", [ resource.openstack_compute_instance_v2.controller-nodes-sto3[count.index % length(resource.openstack_compute_instance_v2.controller-nodes-sto3)].access_ip_v4, "32" ])
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-sto4.id
|
security_group_id = openstack_networking_secgroup_v2.microk8s-sto4.id
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ resource "openstack_networking_secgroup_rule_v2" "microk8s_controller_rule_v6_st
|
||||||
protocol = var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))][keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]]
|
protocol = var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))][keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]]
|
||||||
port_range_min = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
port_range_min = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
||||||
port_range_max = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
port_range_max = keys(var.k8sports[floor(count.index/length(resource.openstack_compute_instance_v2.controller-nodes-sto3))])[0]
|
||||||
provider = openstack.sto3
|
provider = openstack.sto4
|
||||||
remote_ip_prefix = join("/",[ replace(resource.openstack_compute_instance_v2.controller-nodes-sto3[count.index % length(resource.openstack_compute_instance_v2.controller-nodes-sto3)].access_ip_v6, "/[\\[\\]']/",""), "128"])
|
remote_ip_prefix = join("/",[ replace(resource.openstack_compute_instance_v2.controller-nodes-sto3[count.index % length(resource.openstack_compute_instance_v2.controller-nodes-sto3)].access_ip_v6, "/[\\[\\]']/",""), "128"])
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-sto4.id
|
security_group_id = openstack_networking_secgroup_v2.microk8s-sto4.id
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,206 +7,206 @@ data "openstack_networking_secgroup_v2" "allegress" {
|
||||||
name = "allegress"
|
name = "allegress"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "openstack_networking_secgroup_v2" "microk8s-old" {
|
#resource "openstack_networking_secgroup_v2" "microk8s-old" {
|
||||||
name = "microk8s-old"
|
# name = "microk8s-old"
|
||||||
description = "Traffic to allow between microk8s hosts"
|
# description = "Traffic to allow between microk8s hosts"
|
||||||
}
|
#}
|
||||||
|
#
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule1" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule1" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 16443
|
# port_range_min = 16443
|
||||||
port_range_max = 16443
|
# port_range_max = 16443
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule2" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule2" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 16443
|
# port_range_min = 16443
|
||||||
port_range_max = 16443
|
# port_range_max = 16443
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
|
#
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule3" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule3" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10250
|
# port_range_min = 10250
|
||||||
port_range_max = 10250
|
# port_range_max = 10250
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule4" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule4" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10250
|
# port_range_min = 10250
|
||||||
port_range_max = 10250
|
# port_range_max = 10250
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
|
#
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule5" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule5" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10255
|
# port_range_min = 10255
|
||||||
port_range_max = 10255
|
# port_range_max = 10255
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule6" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule6" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10255
|
# port_range_min = 10255
|
||||||
port_range_max = 10255
|
# port_range_max = 10255
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule7" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule7" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 25000
|
# port_range_min = 25000
|
||||||
port_range_max = 25000
|
# port_range_max = 25000
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule8" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule8" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 25000
|
# port_range_min = 25000
|
||||||
port_range_max = 25000
|
# port_range_max = 25000
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule9" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule9" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 12379
|
# port_range_min = 12379
|
||||||
port_range_max = 12379
|
# port_range_max = 12379
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule10" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule10" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 12379
|
# port_range_min = 12379
|
||||||
port_range_max = 12379
|
# port_range_max = 12379
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule11" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule11" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10257
|
# port_range_min = 10257
|
||||||
port_range_max = 10257
|
# port_range_max = 10257
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule12" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule12" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10257
|
# port_range_min = 10257
|
||||||
port_range_max = 10257
|
# port_range_max = 10257
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule13" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule13" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10259
|
# port_range_min = 10259
|
||||||
port_range_max = 10259
|
# port_range_max = 10259
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule14" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule14" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 10259
|
# port_range_min = 10259
|
||||||
port_range_max = 10259
|
# port_range_max = 10259
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule15" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule15" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 19001
|
# port_range_min = 19001
|
||||||
port_range_max = 19001
|
# port_range_max = 19001
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule16" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule16" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 19001
|
# port_range_min = 19001
|
||||||
port_range_max = 19001
|
# port_range_max = 19001
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule17" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule17" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "udp"
|
# protocol = "udp"
|
||||||
port_range_min = 4789
|
# port_range_min = 4789
|
||||||
port_range_max = 4789
|
# port_range_max = 4789
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule18" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule18" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "udp"
|
# protocol = "udp"
|
||||||
port_range_min = 4789
|
# port_range_min = 4789
|
||||||
port_range_max = 4789
|
# port_range_max = 4789
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule19" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule19" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "udp"
|
# protocol = "udp"
|
||||||
port_range_min = 51820
|
# port_range_min = 51820
|
||||||
port_range_max = 51820
|
# port_range_max = 51820
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
resource "openstack_networking_secgroup_rule_v2" "microk8s_rule20" {
|
#resource "openstack_networking_secgroup_rule_v2" "microk8s_rule20" {
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv6"
|
# ethertype = "IPv6"
|
||||||
protocol = "udp"
|
# protocol = "udp"
|
||||||
port_range_min = 51820
|
# port_range_min = 51820
|
||||||
port_range_max = 51820
|
# port_range_max = 51820
|
||||||
remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# remote_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
# security_group_id = openstack_networking_secgroup_v2.microk8s-old.id
|
||||||
}
|
#}
|
||||||
|
#
|
||||||
resource "openstack_networking_secgroup_v2" "https" {
|
#resource "openstack_networking_secgroup_v2" "https" {
|
||||||
name = "https"
|
# name = "https"
|
||||||
description = "Allow https to ingress controller"
|
# description = "Allow https to ingress controller"
|
||||||
}
|
#}
|
||||||
|
#
|
||||||
resource "openstack_networking_secgroup_rule_v2" "https_rule1" {
|
#resource "openstack_networking_secgroup_rule_v2" "https_rule1" {
|
||||||
# External traffic
|
# # External traffic
|
||||||
direction = "ingress"
|
# direction = "ingress"
|
||||||
ethertype = "IPv4"
|
# ethertype = "IPv4"
|
||||||
protocol = "tcp"
|
# protocol = "tcp"
|
||||||
port_range_min = 443
|
# port_range_min = 443
|
||||||
port_range_max = 443
|
# port_range_max = 443
|
||||||
remote_ip_prefix = "0.0.0.0/0"
|
# remote_ip_prefix = "0.0.0.0/0"
|
||||||
security_group_id = openstack_networking_secgroup_v2.https.id
|
# security_group_id = openstack_networking_secgroup_v2.https.id
|
||||||
}
|
#}
|
||||||
|
|
Loading…
Reference in a new issue