Skip to content

Commit f606ede

Browse files
committed
Fix #315 by amending missing linux_os_config block
1 parent 352e4c6 commit f606ede

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

main.tf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,51 @@ resource "azurerm_kubernetes_cluster" "main" {
176176
}
177177
}
178178
}
179+
dynamic "linux_os_config" {
180+
for_each = var.agents_pool_linux_os_configs
181+
182+
content {
183+
swap_file_size_mb = linux_os_config.value.swap_file_size_mb
184+
transparent_huge_page_defrag = linux_os_config.value.transparent_huge_page_defrag
185+
transparent_huge_page_enabled = linux_os_config.value.transparent_huge_page_enabled
186+
187+
dynamic "sysctl_config" {
188+
for_each = linux_os_config.value.sysctl_configs == null ? [] : linux_os_config.value.sysctl_configs
189+
190+
content {
191+
fs_aio_max_nr = sysctl_config.value.fs_aio_max_nr
192+
fs_file_max = sysctl_config.value.fs_file_max
193+
fs_inotify_max_user_watches = sysctl_config.value.fs_inotify_max_user_watches
194+
fs_nr_open = sysctl_config.value.fs_nr_open
195+
kernel_threads_max = sysctl_config.value.kernel_threads_max
196+
net_core_netdev_max_backlog = sysctl_config.value.net_core_netdev_max_backlog
197+
net_core_optmem_max = sysctl_config.value.net_core_optmem_max
198+
net_core_rmem_default = sysctl_config.value.net_core_rmem_default
199+
net_core_rmem_max = sysctl_config.value.net_core_rmem_max
200+
net_core_somaxconn = sysctl_config.value.net_core_somaxconn
201+
net_core_wmem_default = sysctl_config.value.net_core_wmem_default
202+
net_core_wmem_max = sysctl_config.value.net_core_wmem_max
203+
net_ipv4_ip_local_port_range_max = sysctl_config.value.net_ipv4_ip_local_port_range_max
204+
net_ipv4_ip_local_port_range_min = sysctl_config.value.net_ipv4_ip_local_port_range_min
205+
net_ipv4_neigh_default_gc_thresh1 = sysctl_config.value.net_ipv4_neigh_default_gc_thresh1
206+
net_ipv4_neigh_default_gc_thresh2 = sysctl_config.value.net_ipv4_neigh_default_gc_thresh2
207+
net_ipv4_neigh_default_gc_thresh3 = sysctl_config.value.net_ipv4_neigh_default_gc_thresh3
208+
net_ipv4_tcp_fin_timeout = sysctl_config.value.net_ipv4_tcp_fin_timeout
209+
net_ipv4_tcp_keepalive_intvl = sysctl_config.value.net_ipv4_tcp_keepalive_intvl
210+
net_ipv4_tcp_keepalive_probes = sysctl_config.value.net_ipv4_tcp_keepalive_probes
211+
net_ipv4_tcp_keepalive_time = sysctl_config.value.net_ipv4_tcp_keepalive_time
212+
net_ipv4_tcp_max_syn_backlog = sysctl_config.value.net_ipv4_tcp_max_syn_backlog
213+
net_ipv4_tcp_max_tw_buckets = sysctl_config.value.net_ipv4_tcp_max_tw_buckets
214+
net_ipv4_tcp_tw_reuse = sysctl_config.value.net_ipv4_tcp_tw_reuse
215+
net_netfilter_nf_conntrack_buckets = sysctl_config.value.net_netfilter_nf_conntrack_buckets
216+
net_netfilter_nf_conntrack_max = sysctl_config.value.net_netfilter_nf_conntrack_max
217+
vm_max_map_count = sysctl_config.value.vm_max_map_count
218+
vm_swappiness = sysctl_config.value.vm_swappiness
219+
vm_vfs_cache_pressure = sysctl_config.value.vm_vfs_cache_pressure
220+
}
221+
}
222+
}
223+
}
179224
dynamic "aci_connector_linux" {
180225
for_each = var.aci_connector_linux_enabled ? ["aci_connector_linux"] : []
181226

0 commit comments

Comments
 (0)