Skip to content

Commit 60994da

Browse files
committed
add support for anonymous_authentication_config
Signed-off-by: drfaust92 <[email protected]>
1 parent 090781d commit 60994da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+221
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Then perform the following commands on the root folder:
145145
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
146146
| additional\_ip\_range\_pods | List of _names_ of the additional secondary subnet ip ranges to use for pods | `list(string)` | `[]` | no |
147147
| additive\_vpc\_scope\_dns\_domain | This will enable Cloud DNS additive VPC scope. Must provide a domain name that is unique within the VPC. For this to work cluster\_dns = `CLOUD_DNS` and cluster\_dns\_scope = `CLUSTER_SCOPE` must both be set as well. | `string` | `""` | no |
148+
| anonymous\_authentication\_config\_mode | Allows users to restrict or enable anonymous access to the cluster. Valid values are `ENABLED` and `LIMITED`. | `string` | `null` | no |
148149
| 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 [email protected] | `string` | `null` | no |
149150
| boot\_disk\_kms\_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool, if not overridden in `node_pools`. This should be of the form projects/[KEY\_PROJECT\_ID]/locations/[LOCATION]/keyRings/[RING\_NAME]/cryptoKeys/[KEY\_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption | `string` | `null` | no |
150151
| cluster\_autoscaling | Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling) | <pre>object({<br> enabled = bool<br> autoscaling_profile = string<br> min_cpu_cores = optional(number)<br> max_cpu_cores = optional(number)<br> min_memory_gb = optional(number)<br> max_memory_gb = optional(number)<br> gpu_resources = list(object({ resource_type = string, minimum = number, maximum = number }))<br> auto_repair = bool<br> auto_upgrade = bool<br> disk_size = optional(number)<br> disk_type = optional(string)<br> image_type = optional(string)<br> strategy = optional(string)<br> max_surge = optional(number)<br> max_unavailable = optional(number)<br> node_pool_soak_duration = optional(string)<br> batch_soak_duration = optional(string)<br> batch_percentage = optional(number)<br> batch_node_count = optional(number)<br> enable_secure_boot = optional(bool, false)<br> enable_integrity_monitoring = optional(bool, true)<br> })</pre> | <pre>{<br> "auto_repair": true,<br> "auto_upgrade": true,<br> "autoscaling_profile": "BALANCED",<br> "disk_size": 100,<br> "disk_type": "pd-standard",<br> "enable_integrity_monitoring": true,<br> "enable_secure_boot": false,<br> "enabled": false,<br> "gpu_resources": [],<br> "image_type": "COS_CONTAINERD",<br> "max_cpu_cores": 0,<br> "max_memory_gb": 0,<br> "min_cpu_cores": 0,<br> "min_memory_gb": 0<br>}</pre> | no |

autogen/main/cluster.tf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ resource "google_container_cluster" "primary" {
274274

275275
in_transit_encryption_config = var.in_transit_encryption_config
276276

277+
dynamic "anonymous_authentication_config" {
278+
for_each = var.anonymous_authentication_config_mode != null ? [1] : []
279+
content {
280+
mode = var.anonymous_authentication_config_mode
281+
}
282+
}
283+
277284
dynamic "network_performance_config" {
278285
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
279286
content {

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,12 @@ variable "in_transit_encryption_config" {
716716
default = null
717717
}
718718

719+
variable "anonymous_authentication_config_mode" {
720+
description = "Allows users to restrict or enable anonymous access to the cluster. Valid values are `ENABLED` and `LIMITED`."
721+
type = string
722+
default = null
723+
}
724+
719725
variable "total_egress_bandwidth_tier" {
720726
type = string
721727
description = "Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`."

cluster.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ resource "google_container_cluster" "primary" {
213213

214214
in_transit_encryption_config = var.in_transit_encryption_config
215215

216+
217+
dynamic "anonymous_authentication_config" {
218+
for_each = var.anonymous_authentication_config_mode != null ? [1] : []
219+
content {
220+
mode = var.anonymous_authentication_config_mode
221+
}
222+
}
223+
216224
dynamic "network_performance_config" {
217225
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
218226
content {

metadata.display.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
additive_vpc_scope_dns_domain:
4343
name: additive_vpc_scope_dns_domain
4444
title: Additive Vpc Scope Dns Domain
45+
anonymous_authentication_config_mode:
46+
name: anonymous_authentication_config_mode
47+
title: Anonymous Authentication Config Mode
4548
authenticator_security_group:
4649
name: authenticator_security_group
4750
title: Authenticator Security Group
@@ -360,6 +363,9 @@ spec:
360363
ray_operator_config:
361364
name: ray_operator_config
362365
title: Ray Operator Config
366+
rbac_binding_config:
367+
name: rbac_binding_config
368+
title: Rbac Binding Config
363369
region:
364370
name: region
365371
title: Region

metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,9 @@ spec:
562562
- name: in_transit_encryption_config
563563
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
564564
varType: string
565+
- name: anonymous_authentication_config_mode
566+
description: Allows users to restrict or enable anonymous access to the cluster. Valid values are `ENABLED` and `LIMITED`.
567+
varType: string
565568
- name: total_egress_bandwidth_tier
566569
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
567570
varType: string

modules/beta-autopilot-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Then perform the following commands on the root folder:
7878
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
7979
| additional\_ip\_range\_pods | List of _names_ of the additional secondary subnet ip ranges to use for pods | `list(string)` | `[]` | no |
8080
| allow\_net\_admin | (Optional) Enable NET\_ADMIN for the cluster. | `bool` | `null` | no |
81+
| anonymous\_authentication\_config\_mode | Allows users to restrict or enable anonymous access to the cluster. Valid values are `ENABLED` and `LIMITED`. | `string` | `null` | no |
8182
| 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 [email protected] | `string` | `null` | no |
8283
| boot\_disk\_kms\_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool, if not overridden in `node_pools`. This should be of the form projects/[KEY\_PROJECT\_ID]/locations/[LOCATION]/keyRings/[RING\_NAME]/cryptoKeys/[KEY\_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption | `string` | `null` | no |
8384
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ resource "google_container_cluster" "primary" {
133133

134134
in_transit_encryption_config = var.in_transit_encryption_config
135135

136+
dynamic "anonymous_authentication_config" {
137+
for_each = var.anonymous_authentication_config_mode != null ? [1] : []
138+
content {
139+
mode = var.anonymous_authentication_config_mode
140+
}
141+
}
142+
136143
dynamic "network_performance_config" {
137144
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
138145
content {

modules/beta-autopilot-private-cluster/metadata.display.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
allow_net_admin:
4444
name: allow_net_admin
4545
title: Allow Net Admin
46+
anonymous_authentication_config_mode:
47+
name: anonymous_authentication_config_mode
48+
title: Anonymous Authentication Config Mode
4649
authenticator_security_group:
4750
name: authenticator_security_group
4851
title: Authenticator Security Group
@@ -265,6 +268,9 @@ spec:
265268
ray_operator_config:
266269
name: ray_operator_config
267270
title: Ray Operator Config
271+
rbac_binding_config:
272+
name: rbac_binding_config
273+
title: Rbac Binding Config
268274
region:
269275
name: region
270276
title: Region

modules/beta-autopilot-private-cluster/metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ spec:
391391
- name: in_transit_encryption_config
392392
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
393393
varType: string
394+
- name: anonymous_authentication_config_mode
395+
description: Allows users to restrict or enable anonymous access to the cluster. Valid values are `ENABLED` and `LIMITED`.
396+
varType: string
394397
- name: total_egress_bandwidth_tier
395398
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
396399
varType: string

0 commit comments

Comments
 (0)