kubernetes/pkg/proxy/nftables/proxier_test.go

const testHostname

const testNodeIP

const testNodeIPAlt

const testExternalIP

const testNodeIPv6

const testNodeIPv6Alt

const testExternalClient

const testExternalClientBlocked

var testNodeIPs

func NewFakeProxier(ipFamily v1.IPFamily) (*knftables.Fake, *Proxier) {}

var baseRules

// TestOverallNFTablesRules creates a variety of services and verifies that the generated
// rules are exactly as expected.
func TestOverallNFTablesRules(t *testing.T) {}

// TestNoEndpointsReject tests that a service with no endpoints rejects connections to
// its ClusterIP, ExternalIPs, NodePort, and LoadBalancer IP.
func TestNoEndpointsReject(t *testing.T) {}

// TestClusterIPGeneral tests various basic features of a ClusterIP service
func TestClusterIPGeneral(t *testing.T) {}

func TestLoadBalancer(t *testing.T) {}

// TestNodePorts tests NodePort services under various combinations of the
// --nodeport-addresses flags.
func TestNodePorts(t *testing.T) {}

// TestExternalTrafficPolicyLocal tests that traffic to externally-facing IPs does not get
// masqueraded when using Local traffic policy. For traffic from external sources, that
// means it can also only be routed to local endpoints, but for traffic from internal
// sources, it gets routed to all endpoints.
func TestExternalTrafficPolicyLocal(t *testing.T) {}

// TestExternalTrafficPolicyCluster tests that traffic to an externally-facing IP gets
// masqueraded when using Cluster traffic policy.
func TestExternalTrafficPolicyCluster(t *testing.T) {}

func makeTestService(namespace, name string, svcFunc func(*v1.Service)) *v1.Service {}

func addTestPort(array []v1.ServicePort, name string, protocol v1.Protocol, port, nodeport int32, targetPort int) []v1.ServicePort {}

func TestBuildServiceMapAddRemove(t *testing.T) {}

func TestBuildServiceMapServiceHeadless(t *testing.T) {}

func TestBuildServiceMapServiceTypeExternalName(t *testing.T) {}

func TestBuildServiceMapServiceUpdate(t *testing.T) {}

func populateEndpointSlices(proxier *Proxier, allEndpointSlices ...*discovery.EndpointSlice) {}

func makeTestEndpointSlice(namespace, name string, sliceNum int, epsFunc func(*discovery.EndpointSlice)) *discovery.EndpointSlice {}

func makeNSN(namespace, name string) types.NamespacedName {}

func makeServicePortName(ns, name, port string, protocol v1.Protocol) proxy.ServicePortName {}

func makeServiceMap(proxier *Proxier, allServices ...*v1.Service) {}

type endpointExpectation

func checkEndpointExpectations(t *testing.T, tci int, newMap proxy.EndpointsMap, expected map[proxy.ServicePortName][]endpointExpectation) {}

func TestUpdateEndpointsMap(t *testing.T) {}

// TestHealthCheckNodePortWhenTerminating tests that health check node ports are not enabled when all local endpoints are terminating
func TestHealthCheckNodePortWhenTerminating(t *testing.T) {}

// This test ensures that the iptables proxier supports translating Endpoints to
// iptables output when internalTrafficPolicy is specified
func TestInternalTrafficPolicy(t *testing.T) {}

// TestTerminatingEndpointsTrafficPolicyLocal tests that when there are local ready and
// ready + terminating endpoints, only the ready endpoints are used.
func TestTerminatingEndpointsTrafficPolicyLocal(t *testing.T) {}

// TestTerminatingEndpointsTrafficPolicyCluster tests that when there are cluster-wide
// ready and ready + terminating endpoints, only the ready endpoints are used.
func TestTerminatingEndpointsTrafficPolicyCluster(t *testing.T) {}

func TestInternalExternalMasquerade(t *testing.T) {}

// Test calling syncProxyRules() multiple times with various changes
func TestSyncProxyRulesRepeated(t *testing.T) {}

func TestNoEndpointsMetric(t *testing.T) {}

func TestLoadBalancerIngressRouteTypeProxy(t *testing.T) {}

func Test_servicePortChainNameBase(t *testing.T) {}

func Test_servicePortEndpointChainNameBase(t *testing.T) {}

func TestProxier_OnServiceCIDRsChanged(t *testing.T) {}

// TestBadIPs tests that "bad" IPs and CIDRs in Services/Endpoints are rewritten to
// be "good" in the input provided to nft
func TestBadIPs(t *testing.T) {}