Change os from ubuntu to debian and add snap volume
This commit is contained in:
parent
7868e3e751
commit
52095aedd1
19
kube.tf
19
kube.tf
|
@ -9,12 +9,21 @@ resource "openstack_networking_port_v2" "kubeport" {
|
||||||
admin_state_up = "true"
|
admin_state_up = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "openstack_blockstorage_volume_v3" "kubevolume" {
|
resource "openstack_blockstorage_volume_v3" "kubevolumeboot" {
|
||||||
count = var.kubesize # size of cluster
|
count = var.kubesize # size of cluster
|
||||||
name = "kube${count.index + 1}-matrix-test-sunet-se-vol"
|
name = "kube${count.index + 1}-matrix-test-sunet-se-vol"
|
||||||
description = "OS volume for kubernetes node ${count.index + 1}"
|
description = "OS volume for kubernetes node ${count.index + 1}"
|
||||||
size = 30
|
size = 30
|
||||||
image_id = data.openstack_images_image_v2.ubuntu2204image.id
|
image_id = data.openstack_images_image_v2.debian12image.id
|
||||||
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "openstack_blockstorage_volume_v3" "kubevolumesnap" {
|
||||||
|
count = var.kubesize # size of cluster
|
||||||
|
name = "kube${count.index + 1}-matrix-test-sunet-se-vol"
|
||||||
|
description = "OS volume for kubernetes node ${count.index + 1}"
|
||||||
|
size = 50
|
||||||
|
image_id = data.openstack_images_image_v2.debian12image.id
|
||||||
enable_online_resize = true # Allow us to resize volume while attached.
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,10 +39,14 @@ resource "openstack_compute_instance_v2" "kube" {
|
||||||
port = resource.openstack_networking_port_v2.kubeport[count.index].id
|
port = resource.openstack_networking_port_v2.kubeport[count.index].id
|
||||||
}
|
}
|
||||||
block_device {
|
block_device {
|
||||||
uuid = resource.openstack_blockstorage_volume_v3.kubevolume[count.index].id
|
uuid = resource.openstack_blockstorage_volume_v3.kubevolumeboot[count.index].id
|
||||||
source_type = "volume"
|
source_type = "volume"
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
}
|
}
|
||||||
|
block_device {
|
||||||
|
uuid = resource.openstack_blockstorage_volume_v3.kubevolumesnap[count.index].id
|
||||||
|
source_type = "volume"
|
||||||
|
destination_type = "volume"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue