Add option for boot volume type for k8s node (#8256)
This commit is contained in:
parent
0e22a90579
commit
38c12288f1
5 changed files with 11 additions and 0 deletions
|
@ -275,6 +275,7 @@ For your cluster, edit `inventory/$CLUSTER/cluster.tfvars`.
|
||||||
|`node_root_volume_size_in_gb` | Size of the root volume for nodes, 0 to use ephemeral storage |
|
|`node_root_volume_size_in_gb` | Size of the root volume for nodes, 0 to use ephemeral storage |
|
||||||
|`master_root_volume_size_in_gb` | Size of the root volume for masters, 0 to use ephemeral storage |
|
|`master_root_volume_size_in_gb` | Size of the root volume for masters, 0 to use ephemeral storage |
|
||||||
|`master_volume_type` | Volume type of the root volume for control_plane, 'Default' by default |
|
|`master_volume_type` | Volume type of the root volume for control_plane, 'Default' by default |
|
||||||
|
|`node_volume_type` | Volume type of the root volume for nodes, 'Default' by default |
|
||||||
|`gfs_root_volume_size_in_gb` | Size of the root volume for gluster, 0 to use ephemeral storage |
|
|`gfs_root_volume_size_in_gb` | Size of the root volume for gluster, 0 to use ephemeral storage |
|
||||||
|`etcd_root_volume_size_in_gb` | Size of the root volume for etcd nodes, 0 to use ephemeral storage |
|
|`etcd_root_volume_size_in_gb` | Size of the root volume for etcd nodes, 0 to use ephemeral storage |
|
||||||
|`bastion_root_volume_size_in_gb` | Size of the root volume for bastions, 0 to use ephemeral storage |
|
|`bastion_root_volume_size_in_gb` | Size of the root volume for bastions, 0 to use ephemeral storage |
|
||||||
|
|
|
@ -51,6 +51,7 @@ module "compute" {
|
||||||
gfs_root_volume_size_in_gb = var.gfs_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
|
gfs_volume_size_in_gb = var.gfs_volume_size_in_gb
|
||||||
master_volume_type = var.master_volume_type
|
master_volume_type = var.master_volume_type
|
||||||
|
node_volume_type = var.node_volume_type
|
||||||
public_key_path = var.public_key_path
|
public_key_path = var.public_key_path
|
||||||
image = var.image
|
image = var.image
|
||||||
image_uuid = var.image_uuid
|
image_uuid = var.image_uuid
|
||||||
|
|
|
@ -441,6 +441,7 @@ resource "openstack_compute_instance_v2" "k8s_node" {
|
||||||
uuid = local.image_to_use_node
|
uuid = local.image_to_use_node
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = var.node_root_volume_size_in_gb
|
volume_size = var.node_root_volume_size_in_gb
|
||||||
|
volume_type = var.node_volume_type
|
||||||
boot_index = 0
|
boot_index = 0
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
delete_on_termination = true
|
delete_on_termination = true
|
||||||
|
@ -486,6 +487,7 @@ resource "openstack_compute_instance_v2" "k8s_node_no_floating_ip" {
|
||||||
uuid = local.image_to_use_node
|
uuid = local.image_to_use_node
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = var.node_root_volume_size_in_gb
|
volume_size = var.node_root_volume_size_in_gb
|
||||||
|
volume_type = var.node_volume_type
|
||||||
boot_index = 0
|
boot_index = 0
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
delete_on_termination = true
|
delete_on_termination = true
|
||||||
|
@ -527,6 +529,7 @@ resource "openstack_compute_instance_v2" "k8s_nodes" {
|
||||||
uuid = local.image_to_use_node
|
uuid = local.image_to_use_node
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = var.node_root_volume_size_in_gb
|
volume_size = var.node_root_volume_size_in_gb
|
||||||
|
volume_type = var.node_volume_type
|
||||||
boot_index = 0
|
boot_index = 0
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
delete_on_termination = true
|
delete_on_termination = true
|
||||||
|
|
|
@ -40,6 +40,8 @@ variable "gfs_volume_size_in_gb" {}
|
||||||
|
|
||||||
variable "master_volume_type" {}
|
variable "master_volume_type" {}
|
||||||
|
|
||||||
|
variable "node_volume_type" {}
|
||||||
|
|
||||||
variable "public_key_path" {}
|
variable "public_key_path" {}
|
||||||
|
|
||||||
variable "image" {}
|
variable "image" {}
|
||||||
|
|
|
@ -78,6 +78,10 @@ variable "master_volume_type" {
|
||||||
default = "Default"
|
default = "Default"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "node_volume_type" {
|
||||||
|
default = "Default"
|
||||||
|
}
|
||||||
|
|
||||||
variable "public_key_path" {
|
variable "public_key_path" {
|
||||||
description = "The path of the ssh pub key"
|
description = "The path of the ssh pub key"
|
||||||
default = "~/.ssh/id_rsa.pub"
|
default = "~/.ssh/id_rsa.pub"
|
||||||
|
|
Loading…
Reference in a new issue