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

Add configuration flag for #141 #160

Merged
merged 13 commits into from
Jun 7, 2019
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Extending the adopted spec, each change should have a link to its corresponding

### Added

* Add configuration flag for enable BinAuthZ Admission controller [#160]
* Support for a guest accelerator in node pool configuration. [#157]
* Support to scale the default node cluster. [#149]
* Support for configuring the network policy provider. [#159]
Expand Down
3 changes: 3 additions & 0 deletions autogen/cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ resource "google_container_cluster" "primary" {
logging_service = "${var.logging_service}"
monitoring_service = "${var.monitoring_service}"

{% if private_cluster %}
aaron-lane marked this conversation as resolved.
Show resolved Hide resolved
enable_binary_authorization = "${var.enable_binary_authorization}"
{% endif %}
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]

master_auth {
Expand Down
3 changes: 3 additions & 0 deletions autogen/cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ resource "google_container_cluster" "zonal_primary" {
logging_service = "${var.logging_service}"
monitoring_service = "${var.monitoring_service}"

{% if private_cluster %}
enable_binary_authorization = "${var.enable_binary_authorization}"
{% endif %}
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]

master_auth {
Expand Down
7 changes: 7 additions & 0 deletions autogen/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ variable "master_authorized_networks_config" {
default = []
}

{% if private_cluster %}
variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}
ingwarr marked this conversation as resolved.
Show resolved Hide resolved

ingwarr marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| deploy\_using\_private\_endpoint | (Beta) A toggle for Terraform and kubectl to connect to the master's internal IP address during deployment. | string | `"false"` | no |
| description | The description of the cluster | string | `""` | no |
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | string | `"true"` | no |
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no |
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | string | `"false"` | no |
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | string | `"false"` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | string | `"true"` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resource "google_container_cluster" "primary" {
logging_service = "${var.logging_service}"
monitoring_service = "${var.monitoring_service}"

enable_binary_authorization = "${var.enable_binary_authorization}"
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]

master_auth {
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resource "google_container_cluster" "zonal_primary" {
logging_service = "${var.logging_service}"
monitoring_service = "${var.monitoring_service}"

enable_binary_authorization = "${var.enable_binary_authorization}"
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]

master_auth {
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ variable "master_authorized_networks_config" {
default = []
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down