Skip to content

Commit

Permalink
Merge pull request #1680 from chaodaiG/dns-cache
Browse files Browse the repository at this point in the history
Enable nodelocal dnscache on prow build clusters
  • Loading branch information
k8s-ci-robot authored Feb 19, 2021
2 parents 081e94e + 5c33af5 commit f2a4f41
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
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
}

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
}

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

0 comments on commit f2a4f41

Please sign in to comment.