Skip to content

Commit

Permalink
digital-ocean: Join name.dns_zone for controller domain
Browse files Browse the repository at this point in the history
* Output the DNS FQDNs, IPv4 addresses, and IPv6 addresses
  • Loading branch information
dghubble committed Jul 29, 2017
1 parent 6070ffb commit efff749
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bare-metal/container-linux/kubernetes/ssh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "null_resource" "bootkube-start" {
# 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
# 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"]

connection {
Expand Down
2 changes: 1 addition & 1 deletion digital-ocean/container-linux/kubernetes/bootkube.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "bootkube" {
source = "git::https://github.com/dghubble/bootkube-terraform.git?ref=v0.6.0"

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"]
asset_dir = "${var.asset_dir}"
pod_cidr = "${var.pod_cidr}"
Expand Down
4 changes: 2 additions & 2 deletions digital-ocean/container-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "controllers_dns" {
value = "${digitalocean_record.controllers.fqdn}"
value = "${digitalocean_record.controllers.0.fqdn}"
}

output "workers_dns" {
value = "${digitalocean_record.workers.fqdn}"
value = "${digitalocean_record.workers.0.fqdn}"
}

output "controllers_ipv4" {
Expand Down
5 changes: 0 additions & 5 deletions digital-ocean/container-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ variable "ssh_fingerprints" {

# 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" {
description = "Path to a directory where generated assets should be placed (contains secrets)"
type = "string"
Expand Down

0 comments on commit efff749

Please sign in to comment.