From 37a5271f5acb8bfbe151bd4918cce61d9456061f Mon Sep 17 00:00:00 2001 From: Alessio Greggi Date: Mon, 9 May 2022 18:25:19 +0200 Subject: [PATCH] feat: add variables to manage makeIPTablesUtilChains and streamingConnectionIdleTimeout kubelet parameters (#8796) --- docs/vars.md | 2 ++ .../node/templates/kubelet-config.v1beta1.yaml.j2 | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/vars.md b/docs/vars.md index 5a666e388..a63e560b0 100644 --- a/docs/vars.md +++ b/docs/vars.md @@ -192,6 +192,8 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m **Note** that server certificates are **not** approved automatically. Approve them manually (`kubectl get csr`, `kubectl certificate approve`) or implement custom approving controller like [kubelet-rubber-stamp](https://github.com/kontena/kubelet-rubber-stamp). +* *kubelet_streaming_connection_idle_timeout* - Set the maximum time a streaming connection can be idle before the connection is automatically closed. +* *kubelet_make_iptables_util_chains* - If `true`, causes the kubelet ensures a set of `iptables` rules are present on host. * *node_labels* - Labels applied to nodes via kubelet --node-labels parameter. For example, labels can be set in the inventory as variables or more widely in group_vars. *node_labels* can only be defined as a dict: diff --git a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 index 5bf8b1766..1245e59af 100644 --- a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 @@ -117,3 +117,9 @@ shutdownGracePeriodCriticalPods: {{ kubelet_shutdown_grace_period_critical_pods memorySwap: swapBehavior: {{ kubelet_swap_behavior|default("LimitedSwap") }} {% endif %} +{% if kubelet_streaming_connection_idle_timeout is defined %} +streamingConnectionIdleTimeout: {{ kubelet_streaming_connection_idle_timeout }} +{% endif %} +{% if kubelet_make_iptables_util_chains is defined %} +makeIPTablesUtilChains: {{ kubelet_make_iptables_util_chains | bool }} +{% endif %}