-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gke terraform upgrade to 0.12 and fix bastion instance zone to be reg…
…ion agnostic (#554) * Upgrades to terraform 0.12 * Makes script more usable on destroy, specifies terraform >= 0.12 in readme * Updates readme to remove note about node pool deletion contention
- Loading branch information
Showing
6 changed files
with
149 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
data "template_file" "tidb_cluster_values" { | ||
template = "${file("${path.module}/templates/tidb-cluster-values.yaml.tpl")}" | ||
template = file("${path.module}/templates/tidb-cluster-values.yaml.tpl") | ||
|
||
vars { | ||
cluster_version = "${var.tidb_version}" | ||
pd_replicas = "${var.pd_replica_count}" | ||
tikv_replicas = "${var.tikv_replica_count}" | ||
tidb_replicas = "${var.tidb_replica_count}" | ||
operator_version = "${var.tidb_operator_version}" | ||
vars = { | ||
cluster_version = var.tidb_version | ||
pd_replicas = var.pd_replica_count | ||
tikv_replicas = var.tikv_replica_count | ||
tidb_replicas = var.tidb_replica_count | ||
operator_version = var.tidb_operator_version | ||
} | ||
} | ||
|
||
data external "available_zones_in_region" { | ||
depends_on = [null_resource.prepare-dir] | ||
program = ["bash", "-c", "gcloud compute regions describe ${var.GCP_REGION} --format=json | jq '{zone: .zones|.[0]|match(\"[^/]*$\"; \"g\")|.string}'"] | ||
} | ||
|
||
data "external" "tidb_ilb_ip" { | ||
depends_on = ["null_resource.deploy-tidb-cluster"] | ||
depends_on = [null_resource.deploy-tidb-cluster] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-tidb -o json | jq '.status.loadBalancer.ingress[0]'"] | ||
} | ||
|
||
data "external" "monitor_ilb_ip" { | ||
depends_on = ["null_resource.deploy-tidb-cluster"] | ||
depends_on = [null_resource.deploy-tidb-cluster] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-grafana -o json | jq '.status.loadBalancer.ingress[0]'"] | ||
} | ||
|
||
data "external" "tidb_port" { | ||
depends_on = ["null_resource.deploy-tidb-cluster"] | ||
depends_on = [null_resource.deploy-tidb-cluster] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-tidb -o json | jq '.spec.ports | .[] | select( .name == \"mysql-client\") | {port: .port|tostring}'"] | ||
} | ||
|
||
data "external" "monitor_port" { | ||
depends_on = ["null_resource.deploy-tidb-cluster"] | ||
depends_on = [null_resource.deploy-tidb-cluster] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-grafana -o json | jq '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"] | ||
} | ||
|
Oops, something went wrong.