Skip to content

Commit

Permalink
Able to configure image type (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
cofyc committed Aug 16, 2019
1 parent 3ac0364 commit 6c5b6b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/modules/gcp/tidb-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resource "google_container_node_pool" "pd_pool" {

node_config {
machine_type = var.pd_instance_type
image_type = var.pd_image_type
local_ssd_count = 0

taint {
Expand Down Expand Up @@ -47,6 +48,7 @@ resource "google_container_node_pool" "tikv_pool" {

node_config {
machine_type = var.tikv_instance_type
image_type = var.tikv_image_type
// This value cannot be changed (instead a new node pool is needed)
// 1 SSD is 375 GiB
local_ssd_count = 1
Expand Down Expand Up @@ -83,6 +85,7 @@ resource "google_container_node_pool" "tidb_pool" {

node_config {
machine_type = var.tidb_instance_type
image_type = var.tidb_image_type

taint {
effect = "NO_SCHEDULE"
Expand Down
15 changes: 15 additions & 0 deletions deploy/modules/gcp/tidb-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,18 @@ variable "tidb_instance_type" {}
variable "monitor_instance_type" {
default = "n1-standard-2"
}

variable "pd_image_type" {
description = "PD image type, avaiable: UBUNTU/COS"
default = "COS"
}

variable "tidb_image_type" {
description = "TiDB image type, avaiable: UBUNTU/COS"
default = "COS"
}

variable "tikv_image_type" {
description = "TiKV image type, avaiable: UBUNTU/COS"
default = "COS"
}

0 comments on commit 6c5b6b1

Please sign in to comment.