Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform/gcp: Able to configure image type #776

Merged
merged 2 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}