Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
packet_controller: remove template_file
Browse files Browse the repository at this point in the history
template_file is deprecated.

closes: #196
Signed-off-by: knrt10 <kautilya@kinvolk.io>
  • Loading branch information
knrt10 committed Oct 6, 2020
1 parent 7ed9ab8 commit 97095b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ data "ct_config" "controller-ignitions" {
etcd_arch_tag_suffix = var.os_arch == "arm64" ? "-arm64" : ""
etcd_arch_options = var.os_arch == "arm64" ? "ETCD_UNSUPPORTED_ARCH=arm64" : ""
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
etcd_initial_cluster = join(",", [for i in range(var.controller_count) : format("etcd%d=https://%s-etcd%d.%s:2380", i, var.cluster_name, i, var.dns_zone)])
kubeconfig = var.enable_tls_bootstrap ? indent(10, templatefile("${path.module}/workers/cl/bootstrap-kubeconfig.yaml.tmpl", {
token_id = random_string.bootstrap_token_id[0].result
token_secret = random_string.bootstrap_token_secret[0].result
Expand All @@ -74,14 +74,3 @@ data "ct_config" "controller-ignitions" {
})
snippets = var.controller_clc_snippets
}

data "template_file" "etcds" {
count = var.controller_count
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"

vars = {
index = count.index
cluster_name = var.cluster_name
dns_zone = var.dns_zone
}
}
4 changes: 2 additions & 2 deletions pkg/assets/generated_assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97095b9

Please sign in to comment.