Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nodelocal dnscache on prow build clusters #1680

Merged
merged 2 commits into from
Feb 19, 2021
Merged
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
3 changes: 3 additions & 0 deletions infra/gcp/clusters/modules/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ resource "google_container_cluster" "prod_cluster" {
network_policy_config {
disabled = false
}
dns_cache_config {
enabled = var.enable_node_local_dns_cache
}
}

release_channel {
Expand Down
6 changes: 6 additions & 0 deletions infra/gcp/clusters/modules/gke-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ variable "release_channel" {
More information about release channels can be found here : https://cloud.google.com/kubernetes-engine/docs/concepts/release-channels.
EOF
}

variable "enable_node_local_dns_cache" {
description = "If this cluster should have NodeLocal DNSCache enabled"
type = string
default = "false"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ This file defines:
*/

locals {
project_id = "k8s-infra-prow-build-trusted"
cluster_name = "prow-build-trusted" // The name of the cluster defined in this file
cluster_location = "us-central1" // The GCP location (region or zone) where the cluster should be created
bigquery_location = "US" // The bigquery specific location where the dataset should be created
pod_namespace = "test-pods" // MUST match whatever prow is configured to use when it schedules to this cluster
cluster_sa_name = "prow-build-trusted" // Name of the GSA and KSA that pods use by default
gcb_builder_sa_name = "gcb-builder" // Name of the GSA and KSA that pods use to be allowed to run GCB builds and push to GCS buckets
prow_deployer_sa_name = "prow-deployer" // Name of the GSA and KSA that pods use to be allowed to deploy to prow build clusters
project_id = "k8s-infra-prow-build-trusted"
cluster_name = "prow-build-trusted" // The name of the cluster defined in this file
cluster_location = "us-central1" // The GCP location (region or zone) where the cluster should be created
bigquery_location = "US" // The bigquery specific location where the dataset should be created
pod_namespace = "test-pods" // MUST match whatever prow is configured to use when it schedules to this cluster
cluster_sa_name = "prow-build-trusted" // Name of the GSA and KSA that pods use by default
gcb_builder_sa_name = "gcb-builder" // Name of the GSA and KSA that pods use to be allowed to run GCB builds and push to GCS buckets
prow_deployer_sa_name = "prow-deployer" // Name of the GSA and KSA that pods use to be allowed to deploy to prow build clusters
enable_node_local_dns_cache = "true" // Enable NodeLocal DNSCache
Copy link
Member

Choose a reason for hiding this comment

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

nit to self: I guess meant to keep the locals block for "vars that are going to be reused by multiple resources" vs. "all configurable things go up here", but I didn't comment as such (or do so consistently, e.g. bigquery_location doesn't below up here by such convention)

}

module "project" {
Expand Down Expand Up @@ -131,6 +132,7 @@ module "prow_build_cluster" {
bigquery_location = local.bigquery_location
is_prod_cluster = "true"
release_channel = "STABLE"
enable_node_local_dns_cache = local.enable_node_local_dns_cache
}

module "prow_build_nodepool" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ This file defines:
*/

locals {
project_id = "k8s-infra-prow-build"
cluster_name = "prow-build" // The name of the cluster defined in this file
cluster_location = "us-central1" // The GCP location (region or zone) where the cluster should be created
bigquery_location = "US" // The bigquery specific location where the dataset should be created
pod_namespace = "test-pods" // MUST match whatever prow is configured to use when it schedules to this cluster
cluster_sa_name = "prow-build" // Name of the GSA and KSA that pods use by default
boskos_janitor_sa_name = "boskos-janitor" // Name of the GSA and KSA used by boskos-janitor
project_id = "k8s-infra-prow-build"
cluster_name = "prow-build" // The name of the cluster defined in this file
cluster_location = "us-central1" // The GCP location (region or zone) where the cluster should be created
bigquery_location = "US" // The bigquery specific location where the dataset should be created
pod_namespace = "test-pods" // MUST match whatever prow is configured to use when it schedules to this cluster
cluster_sa_name = "prow-build" // Name of the GSA and KSA that pods use by default
boskos_janitor_sa_name = "boskos-janitor" // Name of the GSA and KSA used by boskos-janitor
enable_node_local_dns_cache = "true" // Enable NodeLocal DNSCache
Copy link
Member

Choose a reason for hiding this comment

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

nit: this is unused right now

}

module "project" {
Expand Down Expand Up @@ -106,6 +107,7 @@ module "prow_build_cluster" {
bigquery_location = local.bigquery_location
is_prod_cluster = "true"
release_channel = "STABLE"
enable_node_local_dns_cache = local.enable_node_local_dns_cache
}

module "prow_build_nodepool_n1_highmem_8_maxiops" {
Expand Down