Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kube-router ACCEPT rule insertion and install script to clean rules before start #7274

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
replace (
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.22
github.com/Mirantis/cri-dockerd => github.com/k3s-io/cri-dockerd v0.3.2-0.20230123224936-bcd78c2d21d8 // k3s/release-1.26
github.com/cloudnativelabs/kube-router/v2 => github.com/k3s-io/kube-router/v2 v2.0.1-0.20230405162624-e18008d495ef
github.com/cloudnativelabs/kube-router/v2 => github.com/k3s-io/kube-router/v2 v2.0.1-0.20230411195838-cced939a8ba1
github.com/containerd/cgroups => github.com/containerd/cgroups v1.0.1
github.com/containerd/containerd => github.com/k3s-io/containerd v1.5.18-k3s1
github.com/containerd/stargz-snapshotter => github.com/k3s-io/stargz-snapshotter v0.13.0-k3s1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ github.com/k3s-io/klog v1.0.0-k3s2 h1:yyvD2bQbxG7m85/pvNctLX2bUDmva5kOBvuZ77tTGB
github.com/k3s-io/klog v1.0.0-k3s2/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
github.com/k3s-io/klog/v2 v2.80.1-k3s1 h1:mGMXURxxmabQurmtRhXuQTJ9jC0pvIhESSxRSymepS8=
github.com/k3s-io/klog/v2 v2.80.1-k3s1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
github.com/k3s-io/kube-router/v2 v2.0.1-0.20230405162624-e18008d495ef h1:2bTqV/V8rvkijGZ3CBQ05GLFl2XTqbKdMnaxqonvrus=
github.com/k3s-io/kube-router/v2 v2.0.1-0.20230405162624-e18008d495ef/go.mod h1:zhLSRTL1M+0BqeDTRzT42ZtlFJH/d9xaGvXGQR4c2Gc=
github.com/k3s-io/kube-router/v2 v2.0.1-0.20230411195838-cced939a8ba1 h1:TyefGfus6NkbJKWmEBft0NSb3/D7dYGx9cMkERjdQxc=
github.com/k3s-io/kube-router/v2 v2.0.1-0.20230411195838-cced939a8ba1/go.mod h1:zhLSRTL1M+0BqeDTRzT42ZtlFJH/d9xaGvXGQR4c2Gc=
github.com/k3s-io/kubernetes v1.26.3-k3s1 h1:TGJRkXakMp9i6Xx9c2i0ZTth5W9QVebyONJq0Ifgj00=
github.com/k3s-io/kubernetes v1.26.3-k3s1/go.mod h1:NxzR7U7mS+OGa3J/qweI86Pek//mlfHqDgt6NNGdz8g=
github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.3-k3s1 h1:Ss3lqvwEnFnlCfFOtV7jg71dC1TAGXldOzgY5W5cnTk=
Expand Down
9 changes: 9 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,15 @@ service_enable_and_start() {
return
fi

if command -v iptables-save &> /dev/null && command -v iptables-restore &> /dev/null
then
$SUDO iptables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO iptables-restore
fi
if command -v ip6tables-save &> /dev/null && command -v ip6tables-restore &> /dev/null
then
$SUDO ip6tables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO ip6tables-restore
fi

[ "${HAS_SYSTEMD}" = true ] && systemd_start
[ "${HAS_OPENRC}" = true ] && openrc_start
return 0
Expand Down