Skip to content

Commit

Permalink
openstack/neutron: fix selection of net port ip addresses (coreos#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergiusz Urbaniak authored Jun 6, 2017
1 parent 070b075 commit 83e888e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions platforms/openstack/neutron/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "aws_route53_record" "master_nodes" {
name = "${var.tectonic_cluster_name}-master-${count.index}"
type = "A"
ttl = "60"
records = ["${element(openstack_networking_port_v2.master.*.fixed_ip.0.ip_address, count.index)}"]
records = ["${element(openstack_networking_port_v2.master.*.all_fixed_ips[0], count.index)}"]
}

resource "aws_route53_record" "worker_nodes" {
Expand All @@ -38,7 +38,7 @@ resource "aws_route53_record" "worker_nodes" {
name = "${var.tectonic_cluster_name}-worker-${count.index}"
type = "A"
ttl = "60"
records = ["${element(openstack_networking_port_v2.worker.*.fixed_ip.0.ip_address, count.index)}"]
records = ["${element(openstack_networking_port_v2.worker.*.all_fixed_ips[0], count.index)}"]
}

# etcd
Expand All @@ -64,6 +64,6 @@ resource "aws_route53_record" "etc_a_nodes" {
type = "A"
ttl = "60"
name = "${var.tectonic_cluster_name}-etcd-${count.index}"
records = ["${openstack_compute_instance_v2.etcd_node.*.access_ip_v4[count.index]}"]
records = ["${element(openstack_networking_port_v2.etcd.*.all_fixed_ips[0], count.index)}"]
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
}
12 changes: 6 additions & 6 deletions platforms/openstack/neutron/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ module "bootkube" {
oidc_groups_claim = "groups"
oidc_client_id = "tectonic-kubectl"

etcd_endpoints = ["${openstack_compute_instance_v2.etcd_node.*.access_ip_v4}"]
etcd_ca_cert = "${var.tectonic_etcd_ca_cert_path}"
etcd_client_cert = "${var.tectonic_etcd_client_cert_path}"
etcd_client_key = "${var.tectonic_etcd_client_key_path}"
etcd_endpoints = ["${aws_route53_record.etc_a_nodes.*.fqdn}"]
etcd_ca_cert = "${var.tectonic_etcd_ca_cert_path}"
etcd_client_cert = "${var.tectonic_etcd_client_cert_path}"
etcd_client_key = "${var.tectonic_etcd_client_key_path}"
experimental_enabled = "${var.tectonic_experimental}"
}

module "tectonic" {
Expand Down Expand Up @@ -59,8 +60,7 @@ module "tectonic" {
kubectl_client_id = "tectonic-kubectl"
ingress_kind = "HostPort"
experimental = "${var.tectonic_experimental}"

master_count = "${var.tectonic_master_count}"
master_count = "${var.tectonic_master_count}"
}

module "etcd" {
Expand Down

0 comments on commit 83e888e

Please sign in to comment.