diff --git a/contrib/terraform/openstack/kubespray.tf b/contrib/terraform/openstack/kubespray.tf index dda3bf201993d934b4dd40f282a9b062d8fba44f..15dafa7f5af5e04aef647234bd4d48ccbe91dd5b 100644 --- a/contrib/terraform/openstack/kubespray.tf +++ b/contrib/terraform/openstack/kubespray.tf @@ -51,6 +51,7 @@ module "compute" { node_root_volume_size_in_gb = var.node_root_volume_size_in_gb gfs_root_volume_size_in_gb = var.gfs_root_volume_size_in_gb gfs_volume_size_in_gb = var.gfs_volume_size_in_gb + master_volume_type = var.master_volume_type public_key_path = var.public_key_path image = var.image image_gfs = var.image_gfs diff --git a/contrib/terraform/openstack/modules/compute/main.tf b/contrib/terraform/openstack/modules/compute/main.tf index 3e3238a3e3f3a3b6fe3b4fe79446da8f73f9a3ad..e91316c43bc08bb7b286293776ebacc63103ee09 100644 --- a/contrib/terraform/openstack/modules/compute/main.tf +++ b/contrib/terraform/openstack/modules/compute/main.tf @@ -167,6 +167,7 @@ resource "openstack_compute_instance_v2" "k8s_master" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -215,6 +216,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_etcd" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -303,6 +305,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true @@ -346,6 +349,7 @@ resource "openstack_compute_instance_v2" "k8s_master_no_floating_ip_no_etcd" { uuid = data.openstack_images_image_v2.vm_image.id source_type = "image" volume_size = var.master_root_volume_size_in_gb + volume_type = var.master_volume_type boot_index = 0 destination_type = "volume" delete_on_termination = true diff --git a/contrib/terraform/openstack/modules/compute/variables.tf b/contrib/terraform/openstack/modules/compute/variables.tf index 608cafe4a8044338770dfe6e17c59c143844e91f..1a16a3c4a259a626d0226ba6d6762fb0fe0d61df 100644 --- a/contrib/terraform/openstack/modules/compute/variables.tf +++ b/contrib/terraform/openstack/modules/compute/variables.tf @@ -38,6 +38,8 @@ variable "gfs_root_volume_size_in_gb" {} variable "gfs_volume_size_in_gb" {} +variable "master_volume_type" {} + variable "public_key_path" {} variable "image" {} diff --git a/contrib/terraform/openstack/variables.tf b/contrib/terraform/openstack/variables.tf index 6976929c4bfae848dae3efe421b6f6783046c75f..c6c28f6728bcd0edecfbff6d903dfc9b1e510ff6 100644 --- a/contrib/terraform/openstack/variables.tf +++ b/contrib/terraform/openstack/variables.tf @@ -74,6 +74,10 @@ variable "gfs_volume_size_in_gb" { default = 75 } +variable "master_volume_type" { + default = "Default" +} + variable "public_key_path" { description = "The path of the ssh pub key" default = "~/.ssh/id_rsa.pub"