Skip to content

Commit

Permalink
Merge branch 'master' into feat/fqdn-policies
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Sep 27, 2023
2 parents 690fede + ae26016 commit 08bc1db
Show file tree
Hide file tree
Showing 24 changed files with 316 additions and 990 deletions.
20 changes: 9 additions & 11 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,15 @@ resource "google_container_cluster" "primary" {
monitoring_service = local.logmon_config_is_set ? null : var.monitoring_service
{% endif %}
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
{% if beta_cluster %}
for_each = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? [1] : []
{% else %}
for_each = local.logmon_config_is_set || local.logmon_config_is_set ? [1] : []
{% endif %}
content{
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.logmon_config_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.logmon_config_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
14 changes: 4 additions & 10 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,11 @@ resource "google_container_cluster" "primary" {
}
monitoring_service = local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []

for_each = local.logmon_config_is_set || local.logmon_config_is_set ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : []

dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []

content {
enabled = var.monitoring_enable_managed_prometheus
}
enable_components = var.monitoring_enabled_components
managed_prometheus {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions test/integration/beta_cluster/testdata/TestBetaCluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@
"SYSTEM_COMPONENTS"
]
},
"managedPrometheusConfig": {
"enabled": true
}
"managedPrometheusConfig": {}
},
"monitoringService": "monitoring.googleapis.com/kubernetes",
"name": "CLUSTER_NAME",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"enableComponents": [
"SYSTEM_COMPONENTS"
]
}
},
"managedPrometheusConfig": {}
},
"monitoringService": "monitoring.googleapis.com/kubernetes",
"name": "CLUSTER_NAME",
Expand Down
149 changes: 79 additions & 70 deletions test/integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,98 +3,107 @@ module github.com/terraform-google-modules/terraform-google-kubernetes-engine/te
go 1.20

require (
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.4.1
github.com/gruntwork-io/terratest v0.41.11
github.com/stretchr/testify v1.8.2
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.8.1
github.com/gruntwork-io/terratest v0.44.0
github.com/stretchr/testify v1.8.4
)

require (
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/iam v0.5.0 // indirect
cloud.google.com/go/storage v1.27.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
cloud.google.com/go v0.110.7 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/storage v1.33.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aws/aws-sdk-go v1.45.5 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 // indirect
github.com/go-logr/logr v0.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.3 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/go-errors/errors v1.5.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/gruntwork-io/go-commons v0.8.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gruntwork-io/go-commons v0.17.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-getter v1.7.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.9.1 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/mailru/easyjson v0.7.0 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-zglob v0.0.4 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.2-0.20210217184823-a52172cd2f64 // indirect
github.com/mitchellh/go-testing-interface v1.14.2-0.20210821155943-2d9075ca8770 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/otp v1.2.0 // indirect
github.com/pquerna/otp v1.4.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tidwall/gjson v1.12.1 // indirect
github.com/tidwall/gjson v1.16.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.4 // indirect
github.com/tmccombs/hcl2json v0.3.3 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/urfave/cli v1.22.2 // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tmccombs/hcl2json v0.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.100.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/api v0.138.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.58.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.20.6 // indirect
k8s.io/apimachinery v0.20.6 // indirect
k8s.io/client-go v0.20.6 // indirect
k8s.io/klog/v2 v2.4.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
k8s.io/api v0.28.1 // indirect
k8s.io/apimachinery v0.28.1 // indirect
k8s.io/client-go v0.28.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 08bc1db

Please sign in to comment.