Skip to content

Commit

Permalink
Merge pull request #2210 from spiffxp/terraform-v0.15
Browse files Browse the repository at this point in the history
infra/clusters: upgrade terraform to 0.15 for all but k8s-infra-public-pii
  • Loading branch information
k8s-ci-robot authored Jun 14, 2021
2 parents 3877257 + 9224903 commit cb245cc
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion infra/gcp/clusters/modules/gke-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down
2 changes: 1 addition & 1 deletion infra/gcp/clusters/modules/gke-nodepool/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down
2 changes: 1 addition & 1 deletion infra/gcp/clusters/modules/gke-project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This file defines:
*/

terraform {
required_version = "~> 0.14"
required_version = "~> 0.15"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This file defines:
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ resource "google_service_account_iam_policy" "boskos_janitor_sa_iam" {
policy_data = data.google_iam_policy.boskos_janitor_sa_workload_identity.policy_data
}

// external ip formerly managed by infra/gcp/prow/ensure-e2e-projects.sh
resource "google_compute_address" "boskos_metrics" {
name = "boskos-metrics"
description = "to allow monitoring.k8s.prow.io to scrape boskos metrics"
project = local.project_id
region = local.cluster_location
address_type = "EXTERNAL"
}

// external ip formerly managed by infra/gcp/prow/ensure-e2e-projects.sh
resource "google_compute_address" "greenhouse_metrics" {
name = "greenhouse-metrics"
description = "to allow monitoring.k8s.prow.io to scrape greenhouse metrics"
project = local.project_id
region = local.cluster_location
address_type = "EXTERNAL"
}

module "prow_build_cluster" {
source = "../../../modules/gke-cluster"
project_name = local.project_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This file defines:
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This file defines:
*/

terraform {
required_version = "~> 0.14.0"
required_version = "~> 0.15.0"

backend "gcs" {
bucket = "k8s-infra-tf-public-clusters"
Expand Down
22 changes: 0 additions & 22 deletions infra/gcp/prow/ensure-e2e-projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ BOSKOS_JANITOR_SVCACCT=$(svc_acct_email "${BUILD_CLUSTER_PROJECT}" "boskos-janit
mapfile -t E2E_PROJECTS < <(k8s_infra_projects "e2e")
readonly E2E_PROJECTS

# prow build cluster services that expose metrics endpoints to be scraped
# by monitoring.prow.k8s.io; they each get a regional address
readonly PROW_BUILD_CLUSTER_METRICS_SERVICES=(
"boskos-metrics"
"greenhouse-metrics"
)

function ensure_e2e_project() {
if [ $# != 1 ] || [ -z "$1" ]; then
echo "${FUNCNAME[0]}(project) requires 1 argument" >&2
Expand Down Expand Up @@ -144,21 +137,6 @@ function ensure_e2e_project() {
fi
}

# TODO: this should be moved to the terraform responsible for k8s-infra-prow-build
function ensure_prow_build_cluster_metrics_endpoints() {
local project="${BUILD_CLUSTER_PROJECT}"
local region="us-central1"
for service in "${PROW_BUILD_CLUSTER_METRICS_SERVICES[@]}"; do
color 6 "Ensuring monitoring.prow.k8s.io can scrape ${service} for: ${project}"
ensure_regional_address \
"${project}" \
"${region}" \
"${service}" \
"to allow monitoring.k8s.prow.io to scrape ${service}" \
2>&1 | indent
done
}

# TODO: this should be moved to the terraform responsible for k8s-infra-prow-build-trusted
function ensure_trusted_prow_build_cluster_secrets() {
local project="${TRUSTED_BUILD_CLUSTER_PROJECT}"
Expand Down

0 comments on commit cb245cc

Please sign in to comment.