mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-24 18:19:33 +01:00
Fix the terraform fmt of configs
This commit is contained in:
parent
734bc1d32a
commit
43dc44623f
@ -1,5 +1,4 @@
|
|||||||
output "ingress_dns_name" {
|
output "ingress_dns_name" {
|
||||||
value = "${aws_elb.ingress.dns_name}"
|
value = "${aws_elb.ingress.dns_name}"
|
||||||
description = "DNS name of the ELB for distributing traffic to Ingress controllers"
|
description = "DNS name of the ELB for distributing traffic to Ingress controllers"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
module "bootkube" {
|
module "bootkube" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=v0.7.0"
|
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=v0.7.0"
|
||||||
|
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
api_servers = ["${var.k8s_domain_name}"]
|
api_servers = ["${var.k8s_domain_name}"]
|
||||||
etcd_servers = ["${var.controller_domains}"]
|
etcd_servers = ["${var.controller_domains}"]
|
||||||
asset_dir = "${var.asset_dir}"
|
asset_dir = "${var.asset_dir}"
|
||||||
networking = "${var.networking}"
|
networking = "${var.networking}"
|
||||||
network_mtu = "${var.network_mtu}"
|
network_mtu = "${var.network_mtu}"
|
||||||
pod_cidr = "${var.pod_cidr}"
|
pod_cidr = "${var.pod_cidr}"
|
||||||
service_cidr = "${var.service_cidr}"
|
service_cidr = "${var.service_cidr}"
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ data "template_file" "controller-configs" {
|
|||||||
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", var.controller_names, var.controller_domains))}"
|
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", var.controller_names, var.controller_domains))}"
|
||||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||||
networkd_content = "${element(var.controller_networkds, count.index)}"
|
networkd_content = "${element(var.controller_networkds, count.index)}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +107,6 @@ data "template_file" "worker-configs" {
|
|||||||
domain_name = "${element(var.worker_domains, count.index)}"
|
domain_name = "${element(var.worker_domains, count.index)}"
|
||||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||||
networkd_content = "${element(var.worker_networkds, count.index)}"
|
networkd_content = "${element(var.worker_networkds, count.index)}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,6 @@ resource "null_resource" "copy-kubeconfig" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Secure copy bootkube assets to ONE controller and start bootkube to perform
|
# Secure copy bootkube assets to ONE controller and start bootkube to perform
|
||||||
# one-time self-hosted cluster bootstrapping.
|
# one-time self-hosted cluster bootstrapping.
|
||||||
resource "null_resource" "bootkube-start" {
|
resource "null_resource" "bootkube-start" {
|
||||||
|
@ -119,14 +119,13 @@ variable "kernel_args" {
|
|||||||
# unofficial, undocumented, unsupported, temporary
|
# unofficial, undocumented, unsupported, temporary
|
||||||
|
|
||||||
variable "controller_networkds" {
|
variable "controller_networkds" {
|
||||||
type = "list"
|
type = "list"
|
||||||
description = "Controller Container Linux config networkd section"
|
description = "Controller Container Linux config networkd section"
|
||||||
default = []
|
default = []
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "worker_networkds" {
|
variable "worker_networkds" {
|
||||||
type = "list"
|
type = "list"
|
||||||
description = "Worker Container Linux config networkd section"
|
description = "Worker Container Linux config networkd section"
|
||||||
default = []
|
default = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ variable "kube_dns_service_ip" {
|
|||||||
variable "kernel_args" {
|
variable "kernel_args" {
|
||||||
description = "Additional kernel arguments to provide at PXE boot."
|
description = "Additional kernel arguments to provide at PXE boot."
|
||||||
type = "list"
|
type = "list"
|
||||||
|
|
||||||
default = [
|
default = [
|
||||||
"root=/dev/sda1",
|
"root=/dev/sda1",
|
||||||
]
|
]
|
||||||
|
@ -64,8 +64,9 @@ data "template_file" "controller_config" {
|
|||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
# Cannot use cyclic dependencies on controllers or their DNS records
|
# Cannot use cyclic dependencies on controllers or their DNS records
|
||||||
etcd_name = "etcd${count.index}"
|
etcd_name = "etcd${count.index}"
|
||||||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||||
|
|
||||||
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
||||||
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", null_resource.repeat.*.triggers.name, null_resource.repeat.*.triggers.domain))}"
|
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", null_resource.repeat.*.triggers.name, null_resource.repeat.*.triggers.domain))}"
|
||||||
k8s_dns_service_ip = "${cidrhost(var.service_cidr, 10)}"
|
k8s_dns_service_ip = "${cidrhost(var.service_cidr, 10)}"
|
||||||
|
@ -55,6 +55,7 @@ resource "google_compute_instance_template" "controller" {
|
|||||||
boot = true
|
boot = true
|
||||||
source_image = "${var.os_image}"
|
source_image = "${var.os_image}"
|
||||||
disk_size_gb = "${var.disk_size}"
|
disk_size_gb = "${var.disk_size}"
|
||||||
|
|
||||||
// Set explicit name to match the new default name set by the API.
|
// Set explicit name to match the new default name set by the API.
|
||||||
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||||
device_name = "persistent-disk-0"
|
device_name = "persistent-disk-0"
|
||||||
|
@ -55,6 +55,7 @@ resource "google_compute_instance_template" "worker" {
|
|||||||
boot = true
|
boot = true
|
||||||
source_image = "${var.os_image}"
|
source_image = "${var.os_image}"
|
||||||
disk_size_gb = "${var.disk_size}"
|
disk_size_gb = "${var.disk_size}"
|
||||||
|
|
||||||
// Set explicit name to match the new default name set by the API.
|
// Set explicit name to match the new default name set by the API.
|
||||||
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||||
device_name = "persistent-disk-0"
|
device_name = "persistent-disk-0"
|
||||||
|
Loading…
Reference in New Issue
Block a user