-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix create_tidb_cluster_release variable does not work (#1066)
Signed-off-by: Aylei <rayingecho@gmail.com>
- Loading branch information
Showing
5 changed files
with
35 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
module "tidb-cluster" { | ||
source = "../../share/tidb-cluster-release" | ||
|
||
cluster_name = var.cluster_name | ||
cluster_version = var.cluster_version | ||
pd_count = var.pd_count | ||
tikv_count = var.tikv_count | ||
tidb_count = var.tidb_count | ||
tidb_cluster_chart_version = var.tidb_cluster_chart_version | ||
override_values = var.override_values | ||
local_exec_interpreter = var.local_exec_interpreter | ||
base_values = file("${path.module}/values/default.yaml") | ||
kubeconfig_filename = var.eks.kubeconfig_filename | ||
create = var.create_tidb_cluster_release | ||
cluster_name = var.cluster_name | ||
cluster_version = var.cluster_version | ||
pd_count = var.pd_count | ||
tikv_count = var.tikv_count | ||
tidb_count = var.tidb_count | ||
tidb_cluster_chart_version = var.tidb_cluster_chart_version | ||
override_values = var.override_values | ||
local_exec_interpreter = var.local_exec_interpreter | ||
base_values = file("${path.module}/values/default.yaml") | ||
kubeconfig_filename = var.eks.kubeconfig_filename | ||
} |
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,23 +1,27 @@ | ||
data "external" "tidb_hostname" { | ||
count = var.create ? 1 : 0 | ||
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" { | ||
count = var.create ? 1 : 0 | ||
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]'"] | ||
} | ||
|
||
data "external" "tidb_port" { | ||
count = var.create ? 1 : 0 | ||
depends_on = [helm_release.tidb-cluster] | ||
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 '.spec.ports | .[] | select( .name == \"mysql-client\") | {port: .port|tostring}'"] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${var.kubeconfig_filename} get svc -n ${var.cluster_name} ${var.cluster_name}-tidb -o json | jq '.spec.ports | .[] | select( .name == \"mysql-client\") | {port: .port|tostring}'"] | ||
} | ||
|
||
data "external" "monitor_port" { | ||
count = var.create ? 1 : 0 | ||
depends_on = [helm_release.tidb-cluster] | ||
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 '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"] | ||
program = ["bash", "-c", "kubectl --kubeconfig ${var.kubeconfig_filename} get svc -n ${var.cluster_name} ${var.cluster_name}-grafana -o json | jq '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"] | ||
} |
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
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