Skip to content

Commit 606686e

Browse files
committed
Adding pod_pids_limit in all modules, example and autogen
1 parent f864e8a commit 606686e

File tree

11 files changed

+24
-9
lines changed

11 files changed

+24
-9
lines changed

autogen/main/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ The node_pools variable takes the following parameters:
196196
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
197197
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
198198
| cpu_cfs_quota_period | The CPU CFS quota period value, which specifies the period of how often a cgroup's access to CPU resources should be reallocated | null | Optional |
199+
| pod_pids_limit | Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. | null | Optional |
199200
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
200201
{% endif %}
201202
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100 | Optional |

autogen/main/cluster.tf.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -897,13 +897,14 @@ resource "google_container_node_pool" "windows_pools" {
897897
dynamic "kubelet_config" {
898898
for_each = length(setintersection(
899899
keys(each.value),
900-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
900+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
901901
)) != 0 ? [1] : []
902902

903903
content {
904904
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
905905
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
906906
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
907+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
907908
}
908909
}
909910
{% endif %}

examples/node_pool/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module "gke" {
7878
sandbox_enabled = true
7979
cpu_manager_policy = "static"
8080
cpu_cfs_quota = true
81+
pod_pids_limit = 4096
8182
},
8283
]
8384

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

+1
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ The node_pools variable takes the following parameters:
346346
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
347347
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
348348
| cpu_cfs_quota_period | The CPU CFS quota period value, which specifies the period of how often a cgroup's access to CPU resources should be reallocated | null | Optional |
349+
| pod_pids_limit | Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. | null | Optional |
349350
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
350351
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100 | Optional |
351352
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -780,13 +780,14 @@ resource "google_container_node_pool" "pools" {
780780
dynamic "kubelet_config" {
781781
for_each = length(setintersection(
782782
keys(each.value),
783-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
783+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
784784
)) != 0 ? [1] : []
785785

786786
content {
787787
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
788788
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
789789
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
790+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
790791
}
791792
}
792793

@@ -1015,13 +1016,14 @@ resource "google_container_node_pool" "windows_pools" {
10151016
dynamic "kubelet_config" {
10161017
for_each = length(setintersection(
10171018
keys(each.value),
1018-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
1019+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
10191020
)) != 0 ? [1] : []
10201021

10211022
content {
10221023
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
10231024
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
10241025
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
1026+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
10251027
}
10261028
}
10271029

modules/beta-private-cluster/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ The node_pools variable takes the following parameters:
324324
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
325325
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
326326
| cpu_cfs_quota_period | The CPU CFS quota period value, which specifies the period of how often a cgroup's access to CPU resources should be reallocated | null | Optional |
327+
| pod_pids_limit | Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. | null | Optional |
327328
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
328329
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100 | Optional |
329330
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |

modules/beta-private-cluster/cluster.tf

+4-2
Original file line numberDiff line numberDiff line change
@@ -705,13 +705,14 @@ resource "google_container_node_pool" "pools" {
705705
dynamic "kubelet_config" {
706706
for_each = length(setintersection(
707707
keys(each.value),
708-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
708+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
709709
)) != 0 ? [1] : []
710710

711711
content {
712712
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
713713
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
714714
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
715+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
715716
}
716717
}
717718

@@ -939,13 +940,14 @@ resource "google_container_node_pool" "windows_pools" {
939940
dynamic "kubelet_config" {
940941
for_each = length(setintersection(
941942
keys(each.value),
942-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
943+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
943944
)) != 0 ? [1] : []
944945

945946
content {
946947
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
947948
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
948949
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
950+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
949951
}
950952
}
951953

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

+1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ The node_pools variable takes the following parameters:
333333
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
334334
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
335335
| cpu_cfs_quota_period | The CPU CFS quota period value, which specifies the period of how often a cgroup's access to CPU resources should be reallocated | null | Optional |
336+
| pod_pids_limit | Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. | null | Optional |
336337
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
337338
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100 | Optional |
338339
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |

modules/beta-public-cluster-update-variant/cluster.tf

+4-2
Original file line numberDiff line numberDiff line change
@@ -761,13 +761,14 @@ resource "google_container_node_pool" "pools" {
761761
dynamic "kubelet_config" {
762762
for_each = length(setintersection(
763763
keys(each.value),
764-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
764+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
765765
)) != 0 ? [1] : []
766766

767767
content {
768768
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
769769
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
770770
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
771+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
771772
}
772773
}
773774

@@ -996,13 +997,14 @@ resource "google_container_node_pool" "windows_pools" {
996997
dynamic "kubelet_config" {
997998
for_each = length(setintersection(
998999
keys(each.value),
999-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
1000+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
10001001
)) != 0 ? [1] : []
10011002

10021003
content {
10031004
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
10041005
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
10051006
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
1007+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
10061008
}
10071009
}
10081010

modules/beta-public-cluster/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ The node_pools variable takes the following parameters:
311311
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
312312
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
313313
| cpu_cfs_quota_period | The CPU CFS quota period value, which specifies the period of how often a cgroup's access to CPU resources should be reallocated | null | Optional |
314+
| pod_pids_limit | Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304. | null | Optional |
314315
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
315316
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100 | Optional |
316317
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |

modules/beta-public-cluster/cluster.tf

+4-2
Original file line numberDiff line numberDiff line change
@@ -686,13 +686,14 @@ resource "google_container_node_pool" "pools" {
686686
dynamic "kubelet_config" {
687687
for_each = length(setintersection(
688688
keys(each.value),
689-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
689+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
690690
)) != 0 ? [1] : []
691691

692692
content {
693693
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
694694
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
695695
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
696+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
696697
}
697698
}
698699

@@ -920,13 +921,14 @@ resource "google_container_node_pool" "windows_pools" {
920921
dynamic "kubelet_config" {
921922
for_each = length(setintersection(
922923
keys(each.value),
923-
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period"]
924+
["cpu_manager_policy", "cpu_cfs_quota", "cpu_cfs_quota_period", "pod_pids_limit"]
924925
)) != 0 ? [1] : []
925926

926927
content {
927928
cpu_manager_policy = lookup(each.value, "cpu_manager_policy", "static")
928929
cpu_cfs_quota = lookup(each.value, "cpu_cfs_quota", null)
929930
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
931+
pod_pids_limit = lookup(each.value, "pod_pids_limit", null)
930932
}
931933
}
932934

0 commit comments

Comments
 (0)