mirror of https://github.com/k3s-io/k3s
Merge pull request #54725 from ihmccreery/fix-mdc-fw
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix ENABLE_METADATA_CONCEALMENT firewall rules to respect true/false **What this PR does / why we need it**: Fix ENABLE_METADATA_CONCEALMENT firewall rules to respect true/false; fixes introduced in #54150 (env var value of 'false' would trigger this). Ref #8867. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
afe40ae875
|
@ -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