mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 17:37:39 -02:30
feat: add kubelet systemd service hardening option (#9194)
* feat: add kubelet systemd service hardening option * refactor: move variable name to kubelet_secure_addresses Co-authored-by: Cristian Calin <6627509+cristicalin@users.noreply.github.com> * docs: add diagram about kubelet_secure_addresses variable Co-authored-by: Cristian Calin <6627509+cristicalin@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,11 @@ ExecStart={{ bin_dir }}/kubelet \
|
||||
$KUBELET_CLOUDPROVIDER
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
{% if kubelet_systemd_hardening %}
|
||||
# Hardening setup
|
||||
IPAddressDeny=any
|
||||
IPAddressAllow={{ kubelet_secure_addresses }}
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user