Skip to content

Commit

Permalink
Merge pull request #217 from Dev25/beta-v2
Browse files Browse the repository at this point in the history
Add Authenticator Groups
  • Loading branch information
morgante authored Aug 22, 2019
2 parents b5fb648 + 25aed41 commit 5c17b2e
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Extending the adopted spec, each change should have a link to its corresponding

* Support for Intranode Visbiility (IV) and Veritical Pod Autoscaling (VPA) beta features [#216]
* Support for Workload Identity beta feature [#234]
* Support for Google Groups based RBAC beta feature [#217]

## [v4.1.0] 2019-07-24

Expand Down
7 changes: 7 additions & 0 deletions autogen/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ resource "google_container_cluster" "primary" {
identity_namespace = workload_identity_config.value.identity_namespace
}
}

dynamic "authenticator_groups_config" {
for_each = local.cluster_authenticator_security_group
content {
security_group = authenticator_groups_config.value.security_group
}
}
{% endif %}
}

Expand Down
4 changes: 4 additions & 0 deletions autogen/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ locals {
node_metadata = var.node_metadata
}]

cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
}]

{% endif %}

cluster_output_name = google_container_cluster.primary.name
Expand Down
5 changes: 5 additions & 0 deletions autogen/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,10 @@ variable "identity_namespace" {
default = ""
}

variable "authenticator_security_group" {
type = string
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com"
default = null
}

{% endif %}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | string | `"null"` | no |
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ resource "google_container_cluster" "primary" {
identity_namespace = workload_identity_config.value.identity_namespace
}
}

dynamic "authenticator_groups_config" {
for_each = local.cluster_authenticator_security_group
content {
security_group = authenticator_groups_config.value.security_group
}
}
}

/******************************************
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ locals {
node_metadata = var.node_metadata
}]

cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
}]


cluster_output_name = google_container_cluster.primary.name
cluster_output_location = google_container_cluster.primary.location
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,9 @@ variable "identity_namespace" {
default = ""
}

variable "authenticator_security_group" {
type = string
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com"
default = null
}

1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com | string | `"null"` | no |
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ resource "google_container_cluster" "primary" {
identity_namespace = workload_identity_config.value.identity_namespace
}
}

dynamic "authenticator_groups_config" {
for_each = local.cluster_authenticator_security_group
content {
security_group = authenticator_groups_config.value.security_group
}
}
}

/******************************************
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ locals {
node_metadata = var.node_metadata
}]

cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
}]


cluster_output_name = google_container_cluster.primary.name
cluster_output_location = google_container_cluster.primary.location
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,9 @@ variable "identity_namespace" {
default = ""
}

variable "authenticator_security_group" {
type = string
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format gke-security-groups@yourdomain.com"
default = null
}

0 comments on commit 5c17b2e

Please sign in to comment.