mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Fix ENABLE_METADATA_CONCEALMENT firewall rules to respect true/false
This commit is contained in:
parent
84284c0ba4
commit
9f2b0188bc
@ -93,7 +93,7 @@ function config-ip-firewall {
|
||||
iptables -N KUBE-METADATA-SERVER
|
||||
iptables -I FORWARD -p tcp -d 169.254.169.254 --dport 80 -j KUBE-METADATA-SERVER
|
||||
|
||||
if [[ -n "${ENABLE_METADATA_CONCEALMENT:-}" ]]; then
|
||||
if [[ "${ENABLE_METADATA_CONCEALMENT:-}" == "true" ]]; then
|
||||
iptables -A KUBE-METADATA-SERVER -j DROP
|
||||
fi
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ function config-ip-firewall {
|
||||
iptables -N KUBE-METADATA-SERVER
|
||||
iptables -I FORWARD -p tcp -d 169.254.169.254 --dport 80 -j KUBE-METADATA-SERVER
|
||||
|
||||
if [[ -n "${ENABLE_METADATA_CONCEALMENT:-}" ]]; then
|
||||
if [[ "${ENABLE_METADATA_CONCEALMENT:-}" == "true" ]]; then
|
||||
iptables -A KUBE-METADATA-SERVER -j DROP
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user