Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions modules/gce_net_services/cert-manager.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "google_compute_firewall" "cert-manager-webhook-allow" {
count = "${var.cert_manager_enabled}"
name = "cert-manager-webhook-allow"
network = "${google_compute_network.main.name}"
project = "${var.project}"

source_ranges = ["172.16.0.0/28"]

allow {
protocol = "tcp"
ports = ["6443"]
}

source_tags = "${var.cert_manager_source_tags}"
}
9 changes: 9 additions & 0 deletions modules/gce_net_services/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ variable "nat_ip_count" {
variable "services_subnet_cidr_range" {
default = "10.80.0.0/16"
}

variable "cert_manager_enabled" {
default = 0
}

variable "cert_manager_source_tags" {
type = "list"
default = []
}
3 changes: 3 additions & 0 deletions modules/gce_project/project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ resource "google_project_services" "project" {
"container.googleapis.com",
"containerregistry.googleapis.com",
"storage-component.googleapis.com",
"monitoring.googleapis.com",
"stackdriver.googleapis.com",
"logging.googleapis.com",
]
}

Expand Down
4 changes: 3 additions & 1 deletion travis-ci-prod-services-1/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module "project" {
module "networking" {
source = "../modules/gce_net_services"

project = "${module.project.project_id}"
project = "${module.project.project_id}"
cert_manager_enabled = 1
cert_manager_source_tags = "${var.node_pool_tags}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 27 in this file, we should set the node_pool_tags on kubernetes_cluster dynamically too.

}

module "kubernetes_cluster" {
Expand Down
5 changes: 5 additions & 0 deletions travis-ci-prod-services-1/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ variable "project_id" {
variable "region" {
default = "us-central1"
}

variable "node_pool_tags" {
type = "list"
default = ["services"]
}
4 changes: 3 additions & 1 deletion travis-ci-staging-services-1/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module "project" {
module "networking" {
source = "../modules/gce_net_services"

project = "${module.project.project_id}"
project = "${module.project.project_id}"
cert_manager_enabled = 1
cert_manager_source_tags = "${var.node_pool_tags}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 27 in this file, we should set the node_pool_tags on kubernetes_cluster dynamically too.

}

module "kubernetes_cluster" {
Expand Down
5 changes: 5 additions & 0 deletions travis-ci-staging-services-1/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ variable "project_id" {
variable "region" {
default = "us-central1"
}

variable "node_pool_tags" {
type = "list"
default = ["services"]
}