mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-23 14:06:03 -03:30
Update OpenStack Terraform: Modules, Bastions, and New Floating IP config (#1958)
* Adding bastion and private network provisioning for openstack terraform * Remove usage of floating-ip property * Combine openstack instances + floating ips * Fix relating floating IPs to hosts for openstack builds * Tighten up security groups Allow ssh into all instances with floating IP * Add the gluster hosts to the no-floating group * Break terraform into modules * Update README and var descriptions to match current config * Remove volume property in gluster compute def * Include cluster name in internal network and router names * Make dns_nameservers a variable
This commit is contained in:
committed by
Matthew Mosesohn
parent
6ade7c0a8d
commit
591ae700ce
24
contrib/terraform/openstack/modules/ips/main.tf
Normal file
24
contrib/terraform/openstack/modules/ips/main.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
resource "null_resource" "dummy_dependency" {
|
||||
triggers {
|
||||
dependency_id = "${var.router_id}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "openstack_networking_floatingip_v2" "k8s_master" {
|
||||
count = "${var.number_of_k8s_masters}"
|
||||
pool = "${var.floatingip_pool}"
|
||||
depends_on = ["null_resource.dummy_dependency"]
|
||||
}
|
||||
|
||||
resource "openstack_networking_floatingip_v2" "k8s_node" {
|
||||
count = "${var.number_of_k8s_nodes}"
|
||||
pool = "${var.floatingip_pool}"
|
||||
depends_on = ["null_resource.dummy_dependency"]
|
||||
}
|
||||
|
||||
resource "openstack_networking_floatingip_v2" "bastion" {
|
||||
count = "${var.number_of_bastions}"
|
||||
pool = "${var.floatingip_pool}"
|
||||
depends_on = ["null_resource.dummy_dependency"]
|
||||
}
|
||||
11
contrib/terraform/openstack/modules/ips/outputs.tf
Normal file
11
contrib/terraform/openstack/modules/ips/outputs.tf
Normal file
@@ -0,0 +1,11 @@
|
||||
output "k8s_master_fips" {
|
||||
value = ["${openstack_networking_floatingip_v2.k8s_master.*.address}"]
|
||||
}
|
||||
|
||||
output "k8s_node_fips" {
|
||||
value = ["${openstack_networking_floatingip_v2.k8s_node.*.address}"]
|
||||
}
|
||||
|
||||
output "bastion_fips" {
|
||||
value = ["${openstack_networking_floatingip_v2.bastion.*.address}"]
|
||||
}
|
||||
26
contrib/terraform/openstack/modules/ips/variables.tf
Normal file
26
contrib/terraform/openstack/modules/ips/variables.tf
Normal file
@@ -0,0 +1,26 @@
|
||||
variable "number_of_k8s_masters" {
|
||||
}
|
||||
|
||||
variable "number_of_k8s_masters_no_etcd" {
|
||||
}
|
||||
|
||||
variable "number_of_k8s_nodes" {
|
||||
}
|
||||
|
||||
variable "floatingip_pool" {
|
||||
}
|
||||
|
||||
variable "number_of_bastions" {
|
||||
|
||||
}
|
||||
|
||||
variable "external_net" {
|
||||
|
||||
}
|
||||
|
||||
variable "network_name" {
|
||||
}
|
||||
|
||||
variable "router_id"{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user