digital-ocean: Join name.dns_zone for controller domain
* Output the DNS FQDNs, IPv4 addresses, and IPv6 addresses
This commit is contained in:
parent
6070ffb449
commit
efff7497eb
|
@ -72,7 +72,7 @@ resource "null_resource" "bootkube-start" {
|
||||||
# Without depends_on, this remote-exec may start before the kubeconfig copy.
|
# Without depends_on, this remote-exec may start before the kubeconfig copy.
|
||||||
# Terraform only does one task at a time, so it would try to bootstrap
|
# Terraform only does one task at a time, so it would try to bootstrap
|
||||||
# Kubernetes and Tectonic while no Kubelets are running. Ensure all nodes
|
# Kubernetes and Tectonic while no Kubelets are running. Ensure all nodes
|
||||||
# receive a kubeconfig before proceeding with bootkube and tectonic.
|
# receive a kubeconfig before proceeding with bootkube.
|
||||||
depends_on = ["null_resource.copy-secrets"]
|
depends_on = ["null_resource.copy-secrets"]
|
||||||
|
|
||||||
connection {
|
connection {
|
||||||
|
|
|
@ -3,7 +3,7 @@ module "bootkube" {
|
||||||
source = "git::https://github.com/dghubble/bootkube-terraform.git?ref=v0.6.0"
|
source = "git::https://github.com/dghubble/bootkube-terraform.git?ref=v0.6.0"
|
||||||
|
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
api_servers = ["${var.k8s_domain_name}"]
|
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]
|
||||||
etcd_servers = ["http://127.0.0.1:2379"]
|
etcd_servers = ["http://127.0.0.1:2379"]
|
||||||
asset_dir = "${var.asset_dir}"
|
asset_dir = "${var.asset_dir}"
|
||||||
pod_cidr = "${var.pod_cidr}"
|
pod_cidr = "${var.pod_cidr}"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
output "controllers_dns" {
|
output "controllers_dns" {
|
||||||
value = "${digitalocean_record.controllers.fqdn}"
|
value = "${digitalocean_record.controllers.0.fqdn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "workers_dns" {
|
output "workers_dns" {
|
||||||
value = "${digitalocean_record.workers.fqdn}"
|
value = "${digitalocean_record.workers.0.fqdn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "controllers_ipv4" {
|
output "controllers_ipv4" {
|
||||||
|
|
|
@ -49,11 +49,6 @@ variable "ssh_fingerprints" {
|
||||||
|
|
||||||
# bootkube assets
|
# bootkube assets
|
||||||
|
|
||||||
variable "k8s_domain_name" {
|
|
||||||
type = "string"
|
|
||||||
description = "Controller DNS name which resolves to the controller instance. Kubectl and workers use TLS client credentials to communicate via this endpoint."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "asset_dir" {
|
variable "asset_dir" {
|
||||||
description = "Path to a directory where generated assets should be placed (contains secrets)"
|
description = "Path to a directory where generated assets should be placed (contains secrets)"
|
||||||
type = "string"
|
type = "string"
|
||||||
|
|
Loading…
Reference in New Issue