diff --git a/deploy/modules/aliyun/tidb-operator/operator.tf b/deploy/modules/aliyun/tidb-operator/operator.tf index 670e83b1092..f119f145775 100644 --- a/deploy/modules/aliyun/tidb-operator/operator.tf +++ b/deploy/modules/aliyun/tidb-operator/operator.tf @@ -59,6 +59,6 @@ resource "helm_release" "tidb-operator" { set { name = "scheduler.kubeSchedulerImageName" - value = "gcr.akscn.io/google_containers/hyperkube" + value = "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler-amd64" } -} \ No newline at end of file +} diff --git a/deploy/modules/gcp/tidb-cluster/main.tf b/deploy/modules/gcp/tidb-cluster/main.tf index 3226371026f..bccf8e60e6a 100644 --- a/deploy/modules/gcp/tidb-cluster/main.tf +++ b/deploy/modules/gcp/tidb-cluster/main.tf @@ -136,6 +136,7 @@ module "tidb-cluster" { kubeconfig_filename = var.kubeconfig_path base_values = file("${path.module}/values/default.yaml") wait_on_resource = [google_container_node_pool.tidb_pool] + service_ingress_key = "ip" } resource "null_resource" "wait-lb-ip" { diff --git a/deploy/modules/share/tidb-cluster-release/data.tf b/deploy/modules/share/tidb-cluster-release/data.tf index fce6b832af4..410e634d6ce 100644 --- a/deploy/modules/share/tidb-cluster-release/data.tf +++ b/deploy/modules/share/tidb-cluster-release/data.tf @@ -1,11 +1,11 @@ data "external" "tidb_hostname" { - depends_on = [helm_release.tidb-cluster] + depends_on = [helm_release.tidb-cluster, null_resource.wait-lb-ip] working_dir = path.cwd program = ["bash", "-c", "kubectl --kubeconfig ${var.kubeconfig_filename} get svc -n ${var.cluster_name} ${var.cluster_name}-tidb -o json | jq '.status.loadBalancer.ingress[0]'"] } data "external" "monitor_hostname" { - depends_on = [helm_release.tidb-cluster] + depends_on = [helm_release.tidb-cluster, null_resource.wait-mlb-ip] working_dir = path.cwd program = ["bash", "-c", "kubectl --kubeconfig ${var.kubeconfig_filename} get svc -n ${var.cluster_name} ${var.cluster_name}-grafana -o json | jq '.status.loadBalancer.ingress[0]'"] } diff --git a/deploy/modules/share/tidb-cluster-release/main.tf b/deploy/modules/share/tidb-cluster-release/main.tf index de808a590d3..5908a8a660a 100644 --- a/deploy/modules/share/tidb-cluster-release/main.tf +++ b/deploy/modules/share/tidb-cluster-release/main.tf @@ -139,3 +139,47 @@ EOS } } } + +resource "null_resource" "wait-lb-ip" { + depends_on = [ + helm_release.tidb-cluster + ] + provisioner "local-exec" { + interpreter = ["bash", "-c"] + working_dir = path.cwd + command = <