k3s/pkg/util
Kubernetes Submit Queue 494be59fda Merge pull request #50478 from leblancd/v6_iptables_cmds
Automatic merge from submit-queue (batch tested with PRs 52520, 52033, 53626, 50478). 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 kube-proxy to use proper iptables commands for IPv6 operation

For iptables save and restore operations, kube-proxy currently uses
the IPv4 versions of the iptables save and restore utilities
(iptables-save and iptables-restore, respectively). For IPv6 operation,
the IPv6 versions of these utilities need to be used
(ip6tables-save and ip6tables-restore, respectively).

Both this change and PR #48551 are needed to get Kubernetes services
to work in an IPv6-only Kubernetes cluster (along with setting
'--bind-address ::0' on the kube-proxy command line. This change
was alluded to in a discussion on services for issue #1443.

fixes #50474



**What this PR does / why we need it**:
This change modifies kube-proxy so that it uses the proper commands for iptables save and
iptables restore for IPv6 operation. Currently kube-proxy uses 'iptables-save' and 'iptables-restore'
regardless of whether it is being used in IPv4 or IPv6 mode. This change fixes kube-proxy so
that it uses 'ip6tables-save' and 'ip6tables-restore' commands when kube-proxy is being run
in IPv6 mode.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50474

**Special notes for your reviewer**:

**Release note**:

```release-note NONE
```
2017-10-11 01:41:42 -07:00
..
async
bandwidth
config
configz
dbus
ebtables
env
file
filesystem Fix a potential file leak 2017-09-25 20:45:52 -07:00
flock
goroutinemap Merge pull request #49826 from dixudx/fix_err_msg_on_two_lines 2017-10-03 15:43:44 -07:00
hash
initsystem
interrupt
io Share /var/lib/kubernetes on startup 2017-08-30 16:45:04 +02:00
ipconfig
iptables Merge pull request #50478 from leblancd/v6_iptables_cmds 2017-10-11 01:41:42 -07:00
ipvs implement fakeIPVS update virtual server 2017-10-06 11:58:48 +08:00
keymutex
labels
limitwriter
maps
metrics Return an error if metric cannot be registered 2017-10-09 11:05:32 +02:00
mount auto-gen 2017-09-26 09:57:13 +08:00
net
netsh
node Use separate client for node status loop 2017-09-14 15:56:22 -04:00
nsenter auto-gen 2017-09-26 09:57:13 +08:00
oom Remove cgo flag for oom package 2017-08-29 11:14:02 -07:00
parsers update cadvisor, docker, and runc godeps 2017-09-05 12:38:57 -07:00
pointer
procfs
reflector/prometheus
removeall use GetFileType per mount.Interface to check hostpath type 2017-09-26 09:57:06 +08:00
resourcecontainer
rlimit
selinux update cadvisor, docker, and runc godeps 2017-09-05 12:38:57 -07:00
slice
strings Fix godoc comments. 2017-08-30 15:22:47 +02:00
sysctl
system
tail
taints apimachinery: remove Scheme.DeepCopy 2017-10-06 14:59:17 +02:00
template
term
threading
tolerations
version Fix version comparison for versions with preRelease components 2017-09-27 19:54:43 +03:00
workqueue/prometheus
BUILD auto-gen 2017-09-26 09:57:13 +08:00
verify-util-pkg.sh