mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-24 19:29:33 +01:00
Rename bootkube modules to bootstrap
* Rename render module from bootkube to bootstrap. Avoid confusion with the kubernetes-incubator/bootkube tool since it is no longer used * Use the poseidon/terraform-render-bootstrap Terraform module (formerly poseidon/terraform-render-bootkube) * https://github.com/poseidon/terraform-render-bootkube/pull/149
This commit is contained in:
parent
b15c60fa2f
commit
96b646cf6d
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
||||||
|
@ -71,7 +71,7 @@ data "template_file" "controller-configs" {
|
|||||||
# 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(",", data.template_file.etcds.*.rendered)
|
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||||
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||||
kubeconfig = indent(10, module.bootkube.kubeconfig-kubelet)
|
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for Kubernetes Ingress
|
# Outputs for Kubernetes Ingress
|
||||||
@ -32,7 +32,7 @@ output "worker_security_groups" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "kubeconfig" {
|
output "kubeconfig" {
|
||||||
value = module.bootkube.kubeconfig-kubelet
|
value = module.bootstrap.kubeconfig-kubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for custom load balancing
|
# Outputs for custom load balancing
|
||||||
|
@ -3,7 +3,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
count = var.controller_count
|
count = var.controller_count
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
]
|
]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
@ -14,37 +14,37 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ module "workers" {
|
|||||||
target_groups = var.worker_target_groups
|
target_groups = var.worker_target_groups
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
kubeconfig = module.bootkube.kubeconfig-kubelet
|
kubeconfig = module.bootstrap.kubeconfig-kubelet
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
service_cidr = var.service_cidr
|
service_cidr = var.service_cidr
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
||||||
|
@ -67,7 +67,7 @@ data "template_file" "controller-configs" {
|
|||||||
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(",", data.template_file.etcds.*.rendered)
|
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||||
kubeconfig = indent(10, module.bootkube.kubeconfig-kubelet)
|
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for Kubernetes Ingress
|
# Outputs for Kubernetes Ingress
|
||||||
@ -32,7 +32,7 @@ output "worker_security_groups" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "kubeconfig" {
|
output "kubeconfig" {
|
||||||
value = module.bootkube.kubeconfig-kubelet
|
value = module.bootstrap.kubeconfig-kubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for custom load balancing
|
# Outputs for custom load balancing
|
||||||
|
@ -3,7 +3,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
count = var.controller_count
|
count = var.controller_count
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
]
|
]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
@ -14,37 +14,37 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ module "workers" {
|
|||||||
target_groups = var.worker_target_groups
|
target_groups = var.worker_target_groups
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
kubeconfig = module.bootkube.kubeconfig-kubelet
|
kubeconfig = module.bootstrap.kubeconfig-kubelet
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
service_cidr = var.service_cidr
|
service_cidr = var.service_cidr
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
||||||
|
@ -155,7 +155,7 @@ data "template_file" "controller-configs" {
|
|||||||
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(",", data.template_file.etcds.*.rendered)
|
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||||
kubeconfig = indent(10, module.bootkube.kubeconfig-kubelet)
|
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for Kubernetes Ingress
|
# Outputs for Kubernetes Ingress
|
||||||
@ -28,7 +28,7 @@ output "security_group_id" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "kubeconfig" {
|
output "kubeconfig" {
|
||||||
value = module.bootkube.kubeconfig-kubelet
|
value = module.bootstrap.kubeconfig-kubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for custom firewalling
|
# Outputs for custom firewalling
|
||||||
|
@ -3,7 +3,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
count = var.controller_count
|
count = var.controller_count
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
azurerm_virtual_machine.controllers
|
azurerm_virtual_machine.controllers
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -15,37 +15,37 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ module "workers" {
|
|||||||
priority = var.worker_priority
|
priority = var.worker_priority
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
kubeconfig = module.bootkube.kubeconfig-kubelet
|
kubeconfig = module.bootstrap.kubeconfig-kubelet
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
service_cidr = var.service_cidr
|
service_cidr = var.service_cidr
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [var.k8s_domain_name]
|
api_servers = [var.k8s_domain_name]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ data "template_file" "controller-configs" {
|
|||||||
etcd_name = element(var.controller_names, count.index)
|
etcd_name = element(var.controller_names, count.index)
|
||||||
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))
|
||||||
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
|
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
|
||||||
cluster_dns_service_ip = module.bootkube.cluster_dns_service_ip
|
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ data "template_file" "worker-configs" {
|
|||||||
vars = {
|
vars = {
|
||||||
domain_name = element(var.worker_domains, count.index)
|
domain_name = element(var.worker_domains, count.index)
|
||||||
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
|
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
|
||||||
cluster_dns_service_ip = module.bootkube.cluster_dns_service_ip
|
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
matchbox_group.install,
|
matchbox_group.install,
|
||||||
matchbox_group.controller,
|
matchbox_group.controller,
|
||||||
matchbox_group.worker,
|
matchbox_group.worker,
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
]
|
]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
@ -19,42 +19,42 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ resource "null_resource" "copy-worker-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [var.k8s_domain_name]
|
api_servers = [var.k8s_domain_name]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ data "template_file" "controller-configs" {
|
|||||||
domain_name = var.controller_domains[count.index]
|
domain_name = var.controller_domains[count.index]
|
||||||
etcd_name = var.controller_names[count.index]
|
etcd_name = var.controller_names[count.index]
|
||||||
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))
|
||||||
cluster_dns_service_ip = module.bootkube.cluster_dns_service_ip
|
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ data "template_file" "worker-configs" {
|
|||||||
template = file("${path.module}/fcc/worker.yaml")
|
template = file("${path.module}/fcc/worker.yaml")
|
||||||
vars = {
|
vars = {
|
||||||
domain_name = var.worker_domains[count.index]
|
domain_name = var.worker_domains[count.index]
|
||||||
cluster_dns_service_ip = module.bootkube.cluster_dns_service_ip
|
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
depends_on = [
|
depends_on = [
|
||||||
matchbox_group.controller,
|
matchbox_group.controller,
|
||||||
matchbox_group.worker,
|
matchbox_group.worker,
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
]
|
]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
@ -18,42 +18,42 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ resource "null_resource" "copy-worker-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
output "controllers_dns" {
|
output "controllers_dns" {
|
||||||
|
@ -3,7 +3,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
count = var.controller_count
|
count = var.controller_count
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
digitalocean_firewall.rules
|
digitalocean_firewall.rules
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -15,42 +15,42 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ resource "null_resource" "copy-worker-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.kubeconfig-kubelet
|
content = module.bootstrap.kubeconfig-kubelet
|
||||||
destination = "$HOME/kubeconfig"
|
destination = "$HOME/kubeconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,5 +147,5 @@ module "digital-ocean-nemo" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
To customize lower-level Kubernetes control plane bootstrapping, see the [poseidon/terraform-render-bootkube](https://github.com/poseidon/terraform-render-bootkube) Terraform module.
|
To customize low-level Kubernetes control plane bootstrapping, see the [poseidon/terraform-render-bootstrap](https://github.com/poseidon/terraform-render-bootstrap) Terraform module.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Kubernetes assets (kubeconfig, manifests)
|
# Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
module "bootstrap" {
|
||||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
source = "git::https://github.com/poseidon/terraform-render-bootstrap.git?ref=6e59af71138bc5f784453873074de16e7ee150eb"
|
||||||
|
|
||||||
cluster_name = var.cluster_name
|
cluster_name = var.cluster_name
|
||||||
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
api_servers = [format("%s.%s", var.cluster_name, var.dns_zone)]
|
||||||
|
@ -85,7 +85,7 @@ data "template_file" "controller-configs" {
|
|||||||
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(",", data.template_file.etcds.*.rendered)
|
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||||
kubeconfig = indent(10, module.bootkube.kubeconfig-kubelet)
|
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
output "kubeconfig-admin" {
|
output "kubeconfig-admin" {
|
||||||
value = module.bootkube.kubeconfig-admin
|
value = module.bootstrap.kubeconfig-admin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for Kubernetes Ingress
|
# Outputs for Kubernetes Ingress
|
||||||
@ -21,7 +21,7 @@ output "network_name" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "kubeconfig" {
|
output "kubeconfig" {
|
||||||
value = module.bootkube.kubeconfig-kubelet
|
value = module.bootstrap.kubeconfig-kubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for custom firewalling
|
# Outputs for custom firewalling
|
||||||
|
@ -3,7 +3,7 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
count = var.controller_count
|
count = var.controller_count
|
||||||
|
|
||||||
depends_on = [
|
depends_on = [
|
||||||
module.bootkube,
|
module.bootstrap,
|
||||||
]
|
]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
@ -14,37 +14,37 @@ resource "null_resource" "copy-controller-secrets" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_ca_cert
|
content = module.bootstrap.etcd_ca_cert
|
||||||
destination = "$HOME/etcd-client-ca.crt"
|
destination = "$HOME/etcd-client-ca.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_cert
|
content = module.bootstrap.etcd_client_cert
|
||||||
destination = "$HOME/etcd-client.crt"
|
destination = "$HOME/etcd-client.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_client_key
|
content = module.bootstrap.etcd_client_key
|
||||||
destination = "$HOME/etcd-client.key"
|
destination = "$HOME/etcd-client.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_cert
|
content = module.bootstrap.etcd_server_cert
|
||||||
destination = "$HOME/etcd-server.crt"
|
destination = "$HOME/etcd-server.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_server_key
|
content = module.bootstrap.etcd_server_key
|
||||||
destination = "$HOME/etcd-server.key"
|
destination = "$HOME/etcd-server.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_cert
|
content = module.bootstrap.etcd_peer_cert
|
||||||
destination = "$HOME/etcd-peer.crt"
|
destination = "$HOME/etcd-peer.crt"
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = module.bootkube.etcd_peer_key
|
content = module.bootstrap.etcd_peer_key
|
||||||
destination = "$HOME/etcd-peer.key"
|
destination = "$HOME/etcd-peer.key"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ module "workers" {
|
|||||||
preemptible = var.worker_preemptible
|
preemptible = var.worker_preemptible
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
kubeconfig = module.bootkube.kubeconfig-kubelet
|
kubeconfig = module.bootstrap.kubeconfig-kubelet
|
||||||
ssh_authorized_key = var.ssh_authorized_key
|
ssh_authorized_key = var.ssh_authorized_key
|
||||||
service_cidr = var.service_cidr
|
service_cidr = var.service_cidr
|
||||||
cluster_domain_suffix = var.cluster_domain_suffix
|
cluster_domain_suffix = var.cluster_domain_suffix
|
||||||
|
Loading…
Reference in New Issue
Block a user