mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Move iptables consts to kubelet_network_linux.go.
This commit is contained in:
@@ -22,22 +22,6 @@ import (
|
|||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
|
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
utiliptables "k8s.io/kubernetes/pkg/util/iptables"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// KubeMarkMasqChain is the mark-for-masquerade chain
|
|
||||||
// TODO: clean up this logic in kube-proxy
|
|
||||||
KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ"
|
|
||||||
|
|
||||||
// KubeMarkDropChain is the mark-for-drop chain
|
|
||||||
KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP"
|
|
||||||
|
|
||||||
// KubePostroutingChain is kubernetes postrouting rules
|
|
||||||
KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING"
|
|
||||||
|
|
||||||
// KubeFirewallChain is kubernetes firewall rules
|
|
||||||
KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// providerRequiresNetworkingConfiguration returns whether the cloud provider
|
// providerRequiresNetworkingConfiguration returns whether the cloud provider
|
||||||
|
@@ -30,6 +30,21 @@ import (
|
|||||||
utilnet "k8s.io/utils/net"
|
utilnet "k8s.io/utils/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// KubeMarkMasqChain is the mark-for-masquerade chain
|
||||||
|
// TODO: clean up this logic in kube-proxy
|
||||||
|
KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ"
|
||||||
|
|
||||||
|
// KubeMarkDropChain is the mark-for-drop chain
|
||||||
|
KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP"
|
||||||
|
|
||||||
|
// KubePostroutingChain is kubernetes postrouting rules
|
||||||
|
KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING"
|
||||||
|
|
||||||
|
// KubeFirewallChain is kubernetes firewall rules
|
||||||
|
KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL"
|
||||||
|
)
|
||||||
|
|
||||||
func (kl *Kubelet) initNetworkUtil() {
|
func (kl *Kubelet) initNetworkUtil() {
|
||||||
exec := utilexec.New()
|
exec := utilexec.New()
|
||||||
// TODO: @khenidak review when there is no IPv6 iptables exec what should happen here (note: no error returned from this func)
|
// TODO: @khenidak review when there is no IPv6 iptables exec what should happen here (note: no error returned from this func)
|
||||||
|
Reference in New Issue
Block a user