Skip to content

Commit

Permalink
PLAT-6547: Required webhook ports (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Fraenkel authored Apr 14, 2023
1 parent a753881 commit ba3cbb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

parameters:
terraform_version:
default: "1.3.7"
default: "1.4.5"
type: string

orbs:
Expand Down
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ locals {
taint_effects = { "NoSchedule" : "NO_SCHEDULE", "PreferNoSchedule" : "PREFER_NO_SCHEDULE", "NoExecute" : "NO_EXECUTE" }

crypto_key_id = var.database_encryption_key_name == null ? google_kms_crypto_key.crypto_key[0].id : var.database_encryption_key_name

# webhooks: prometheus-adapter, hephaestus, istio
required_webhooks = ["6443", "9443", "15017"]
}

provider "google" {
Expand Down Expand Up @@ -315,15 +318,13 @@ resource "google_compute_firewall" "iap_tcp_forwarding" {
target_tags = ["iap-tcp-forwarding-allowed"]
}

# https://github.com/istio/istio/issues/19532
# https://github.com/istio/istio/issues/21991
resource "google_compute_firewall" "master_webhooks" {
name = "gke-${var.deploy_id}-master-to-webhook"
network = google_compute_network.vpc_network.name

allow {
protocol = "tcp"
ports = var.master_firewall_ports
ports = distinct(concat(local.required_webhooks, var.master_firewall_ports))
}

source_ranges = [google_container_cluster.domino_cluster.private_cluster_config[0].master_ipv4_cidr_block]
Expand Down

0 comments on commit ba3cbb5

Please sign in to comment.