diff --git a/app/apis/nkd/const.go b/app/apis/nkd/const.go index a8a25efc7cfb5c571cb34364adebe886eb593f5c..6b13d8388b153383e87036e929e586615e28bb1a 100644 --- a/app/apis/nkd/const.go +++ b/app/apis/nkd/const.go @@ -47,7 +47,7 @@ var ( Openstack_Region = "" Openstack_Internal_network = "" Openstack_External_network = "" - Openstack_Master_ip = []string{"", "", ""} + Openstack_Master_ip = []string{"10.1.10.51", "", ""} Openstack_Flavor_Name = "" Openstack_Glance_Name = "" Availability_zone = "" diff --git a/data/terraform/master.tf.template b/data/terraform/master.tf.template index 920861b10814fb28aafe2ea18c6d0e01eaf2b617..4ddcbf6a13bb0444549509fb779593f4b6abd835 100644 --- a/data/terraform/master.tf.template +++ b/data/terraform/master.tf.template @@ -53,6 +53,62 @@ resource "openstack_compute_secgroup_v2" "secgroup" { ip_protocol = "icmp" cidr = "0.0.0.0/0" } + + rule { + from_port = 80 + to_port = 80 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 443 + to_port = 443 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 2379 + to_port = 2380 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 179 + to_port = 179 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 6443 + to_port = 6443 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 10250 + to_port = 10250 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 30000 + to_port = 32767 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 30000 + to_port = 32767 + ip_protocol = "udp" + cidr = "0.0.0.0/0" + } } resource "openstack_compute_instance_v2" "instance" { diff --git a/data/terraform/worker.tf.template b/data/terraform/worker.tf.template index a3a41d68c39d900230f684ac778a27326975cd0d..7c8c2bae7807856cc7c7dabb5dbd9f2baa47fa8d 100644 --- a/data/terraform/worker.tf.template +++ b/data/terraform/worker.tf.template @@ -53,6 +53,62 @@ resource "openstack_compute_secgroup_v2" "secgroup" { ip_protocol = "icmp" cidr = "0.0.0.0/0" } + + rule { + from_port = 80 + to_port = 80 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 443 + to_port = 443 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 2379 + to_port = 2380 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 179 + to_port = 179 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 6443 + to_port = 6443 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 10250 + to_port = 10250 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 30000 + to_port = 32767 + ip_protocol = "tcp" + cidr = "0.0.0.0/0" + } + + rule { + from_port = 30000 + to_port = 32767 + ip_protocol = "udp" + cidr = "0.0.0.0/0" + } } resource "openstack_compute_instance_v2" "instance" {