Skip to content

Commit 1d8356d

Browse files
author
Aaron Lane
authored
Merge pull request #356 from bharathkkb/feature/default-enable-network-policy
Enable network_policy by default
2 parents 152ff2e + 2abd7b4 commit 1d8356d

File tree

24 files changed

+20
-38
lines changed

24 files changed

+20
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
153153
| 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 |
154154
| name | The name of the cluster (required) | string | n/a | yes |
155155
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
156-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
156+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
157157
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
158158
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
159159
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |

autogen/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

examples/stub_domains/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module "gke" {
3232
subnetwork = var.subnetwork
3333
ip_range_pods = var.ip_range_pods
3434
ip_range_services = var.ip_range_services
35-
network_policy = true
3635
service_account = var.compute_engine_service_account
3736
create_service_account = false
3837

examples/stub_domains_private/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ module "gke" {
4949

5050
master_ipv4_cidr_block = "172.16.0.0/28"
5151

52-
network_policy = true
5352
create_service_account = false
5453
service_account = var.compute_engine_service_account
5554

examples/stub_domains_upstream_nameservers/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module "gke" {
3232
subnetwork = var.subnetwork
3333
ip_range_pods = var.ip_range_pods
3434
ip_range_services = var.ip_range_services
35-
network_policy = true
3635
create_service_account = false
3736
service_account = var.compute_engine_service_account
3837

examples/upstream_nameservers/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module "gke" {
3232
subnetwork = var.subnetwork
3333
ip_range_pods = var.ip_range_pods
3434
ip_range_services = var.ip_range_services
35-
network_policy = true
3635
create_service_account = false
3736
service_account = var.compute_engine_service_account
3837

modules/beta-private-cluster-update-variant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
176176
| 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 |
177177
| name | The name of the cluster (required) | string | n/a | yes |
178178
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
179-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
179+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
180180
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
181181
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
182182
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |

modules/beta-private-cluster-update-variant/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
176176
| 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 |
177177
| name | The name of the cluster (required) | string | n/a | yes |
178178
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
179-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
179+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
180180
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
181181
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
182182
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |

modules/beta-private-cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
167167
| 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 |
168168
| name | The name of the cluster (required) | string | n/a | yes |
169169
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
170-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
170+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
171171
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
172172
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
173173
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | string | `"SECURE"` | no |

modules/beta-public-cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

modules/private-cluster-update-variant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
162162
| 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 |
163163
| name | The name of the cluster (required) | string | n/a | yes |
164164
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
165-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
165+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
166166
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
167167
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
168168
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |

modules/private-cluster-update-variant/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

modules/private-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
162162
| 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 |
163163
| name | The name of the cluster (required) | string | n/a | yes |
164164
| network | The VPC network to host the cluster in (required) | string | n/a | yes |
165-
| network\_policy | Enable network policy addon | bool | `"false"` | no |
165+
| network\_policy | Enable network policy addon | bool | `"true"` | no |
166166
| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no |
167167
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no |
168168
| node\_pools | List of maps containing node pools | list(map(string)) | `<list>` | no |

modules/private-cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

test/integration/private_zonal_with_networking/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@
5858
"kubernetesDashboard" => {
5959
"disabled" => true,
6060
},
61-
"networkPolicyConfig" => {
62-
"disabled" => true,
63-
},
61+
"networkPolicyConfig" => {},
6462
})
6563
end
6664
end

test/integration/sandbox_enabled/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
"kubernetesDashboard" => {
5151
"disabled" => true,
5252
},
53-
"networkPolicyConfig" => {
54-
"disabled" => true,
55-
},
53+
"networkPolicyConfig" => {},
5654
})
5755
end
5856
end

test/integration/simple_regional/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
"kubernetesDashboard" => {
5151
"disabled" => true,
5252
},
53-
"networkPolicyConfig" => {
54-
"disabled" => true,
55-
},
53+
"networkPolicyConfig" => {},
5654
})
5755
end
5856
end

test/integration/simple_regional_private/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@
5454
"kubernetesDashboard" => {
5555
"disabled" => true,
5656
},
57-
"networkPolicyConfig" => {
58-
"disabled" => true,
59-
},
57+
"networkPolicyConfig" => {},
6058
})
6159
end
6260
end

test/integration/simple_regional_with_networking/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
"kubernetesDashboard" => {
5151
"disabled" => true,
5252
},
53-
"networkPolicyConfig" => {
54-
"disabled" => true,
55-
},
53+
"networkPolicyConfig" => {},
5654
})
5755
end
5856
end

test/integration/simple_zonal/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@
5555
"kubernetesDashboard" => {
5656
"disabled" => true,
5757
},
58-
"networkPolicyConfig" => {
59-
"disabled" => true,
60-
},
58+
"networkPolicyConfig" => {},
6159
})
6260
end
6361
end

test/integration/simple_zonal_private/controls/gcloud.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@
5858
"kubernetesDashboard" => {
5959
"disabled" => true,
6060
},
61-
"networkPolicyConfig" => {
62-
"disabled" => true,
63-
},
61+
"networkPolicyConfig" => {},
6462
})
6563
end
6664
end

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ variable "http_load_balancing" {
9999
variable "network_policy" {
100100
type = bool
101101
description = "Enable network policy addon"
102-
default = false
102+
default = true
103103
}
104104

105105
variable "network_policy_provider" {

0 commit comments

Comments
 (0)