Skip to content

Commit

Permalink
Merge pull request terraform-google-modules#356 from bharathkkb/featu…
Browse files Browse the repository at this point in the history
…re/default-enable-network-policy

Enable network_policy by default
  • Loading branch information
Aaron Lane authored Nov 29, 2019
2 parents 25905cf + 27a09f7 commit 5f5a4c9
Show file tree
Hide file tree
Showing 24 changed files with 20 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |
Expand Down
2 changes: 1 addition & 1 deletion autogen/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
1 change: 0 additions & 1 deletion examples/stub_domains/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module "gke" {
subnetwork = var.subnetwork
ip_range_pods = var.ip_range_pods
ip_range_services = var.ip_range_services
network_policy = true
service_account = var.compute_engine_service_account
create_service_account = false

Expand Down
1 change: 0 additions & 1 deletion examples/stub_domains_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module "gke" {

master_ipv4_cidr_block = "172.16.0.0/28"

network_policy = true
create_service_account = false
service_account = var.compute_engine_service_account

Expand Down
1 change: 0 additions & 1 deletion examples/stub_domains_upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module "gke" {
subnetwork = var.subnetwork
ip_range_pods = var.ip_range_pods
ip_range_services = var.ip_range_services
network_policy = true
create_service_account = false
service_account = var.compute_engine_service_account

Expand Down
1 change: 0 additions & 1 deletion examples/upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module "gke" {
subnetwork = var.subnetwork
ip_range_pods = var.ip_range_pods
ip_range_services = var.ip_range_services
network_policy = true
create_service_account = false
service_account = var.compute_engine_service_account

Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no |
| name | The name of the cluster (required) | string | n/a | yes |
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
| network\_policy | Enable network policy addon | bool | `"false"` | no |
| network\_policy | Enable network policy addon | bool | `"true"` | no |
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
4 changes: 1 addition & 3 deletions test/integration/sandbox_enabled/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
4 changes: 1 addition & 3 deletions test/integration/simple_regional/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
4 changes: 1 addition & 3 deletions test/integration/simple_regional_private/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
4 changes: 1 addition & 3 deletions test/integration/simple_zonal/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
4 changes: 1 addition & 3 deletions test/integration/simple_zonal_private/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
"kubernetesDashboard" => {
"disabled" => true,
},
"networkPolicyConfig" => {
"disabled" => true,
},
"networkPolicyConfig" => {},
})
end
end
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "http_load_balancing" {
variable "network_policy" {
type = bool
description = "Enable network policy addon"
default = false
default = true
}

variable "network_policy_provider" {
Expand Down

0 comments on commit 5f5a4c9

Please sign in to comment.