Skip to content

Commit fcaecd9

Browse files
authored
Merge branch 'main' into sysdump-capture-top-nodes-pods
2 parents 50bcf38 + b582aee commit fcaecd9

5 files changed

Lines changed: 12 additions & 44 deletions

File tree

Documentation/network/kubernetes/local-redirect-policy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ steers traffic to a local DNS node-cache which runs as a normal pod.
481481
need to modify those to match your deployment if they are different.
482482

483483
After all ``node-local-dns`` pods are in ready status, DNS traffic will now go to the local node-cache first.
484-
You can verify by checking the DNS cache's metrics ``coredns_dns_request_count_total`` via curling
484+
You can verify by checking the DNS cache's metrics ``coredns_dns_requests_total`` via curling
485485
``<node-local-dns pod IP>:9253/metrics``, the metric should increment as new DNS requests being issued from
486486
application pods are now redirected to the ``node-local-dns`` pod.
487487

cilium-cli/connectivity/check/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ func (ct *ConnectivityTest) KillMulticastTestSender() []string {
13161316
return cmd
13171317
}
13181318

1319-
func (ct *ConnectivityTest) ForEachIPFamily(hasNetworkPolicies bool, do func(features.IPFamily)) {
1319+
func (ct *ConnectivityTest) ForEachIPFamily(do func(features.IPFamily)) {
13201320
ipFams := features.GetIPFamilies(ct.Params().IPFamilies)
13211321

13221322
for _, ipFam := range ipFams {

cilium-cli/connectivity/check/deployment.go

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,11 +1571,7 @@ func (ct *ConnectivityTest) createTestConnDisruptClientDeploymentForNSTraffic(ct
15711571
var errs error
15721572
np := uint16(svc.Spec.Ports[0].NodePort)
15731573
addrs := slices.Clone(n.node.Status.Addresses)
1574-
hasNetworkPolicies, err := ct.hasNetworkPolicies(ctx)
1575-
if err != nil {
1576-
return fmt.Errorf("failed to check if any netpol exists: %w", err)
1577-
}
1578-
ct.ForEachIPFamily(hasNetworkPolicies, func(family features.IPFamily) {
1574+
ct.ForEachIPFamily(func(family features.IPFamily) {
15791575
for _, addr := range addrs {
15801576
if features.GetIPFamily(addr.Address) != family {
15811577
continue
@@ -1738,36 +1734,6 @@ func (ct *ConnectivityTest) GetConnDisruptEgressPolicyEntries(ctx context.Contex
17381734
return targetEntries, nil
17391735
}
17401736

1741-
func (ct *ConnectivityTest) hasNetworkPolicies(ctx context.Context) (bool, error) {
1742-
for _, client := range ct.Clients() {
1743-
cnps, err := client.ListCiliumNetworkPolicies(ctx, ct.params.TestNamespace, metav1.ListOptions{Limit: 1})
1744-
if err != nil {
1745-
return false, err
1746-
}
1747-
if len(cnps.Items) > 0 {
1748-
return true, nil
1749-
}
1750-
1751-
ccnps, err := client.ListCiliumClusterwideNetworkPolicies(ctx, metav1.ListOptions{Limit: 1})
1752-
if err != nil {
1753-
return false, err
1754-
}
1755-
if len(ccnps.Items) > 0 {
1756-
return true, nil
1757-
}
1758-
1759-
nps, err := client.ListNetworkPolicies(ctx, metav1.ListOptions{Limit: 1})
1760-
if err != nil {
1761-
return false, err
1762-
}
1763-
if len(nps.Items) > 0 {
1764-
return true, nil
1765-
}
1766-
}
1767-
1768-
return false, nil
1769-
}
1770-
17711737
func (ct *ConnectivityTest) createClientPerfDeployment(ctx context.Context, name string, nodeName string, hostNetwork bool) error {
17721738
ct.Logf("✨ [%s] Deploying %s deployment...", ct.clients.src.ClusterName(), name)
17731739
gracePeriod := int64(1)

cilium-cli/connectivity/check/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ func (t *Test) collectSysdump() {
913913
}
914914

915915
func (t *Test) ForEachIPFamily(do func(features.IPFamily)) {
916-
t.ctx.ForEachIPFamily(t.HasNetworkPolicies(), do)
916+
t.ctx.ForEachIPFamily(do)
917917
}
918918

919919
// CertificateCAs returns the CAs used to sign the certificates within the test.

cilium-cli/connectivity/tests/service.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,14 @@ func (s *podToL7Service) Run(ctx context.Context, t *check.Test) {
381381
if !hasAllLabels(svc, s.destinationLabels) {
382382
continue
383383
}
384-
t.NewAction(s, fmt.Sprintf("curl-%d", i), &pod, svc, features.IPFamilyAny).Run(func(a *check.Action) {
385-
a.ExecInPod(ctx, a.CurlCommand(svc))
386-
a.ValidateFlows(ctx, pod, a.GetEgressRequirements(check.FlowParameters{
387-
DNSRequired: true,
388-
AltDstPort: svc.Port(),
389-
}))
384+
t.ForEachIPFamily(func(ipFamily features.IPFamily) {
385+
t.NewAction(s, fmt.Sprintf("curl-%s-%d", ipFamily, i), &pod, svc, ipFamily).Run(func(a *check.Action) {
386+
a.ExecInPod(ctx, a.CurlCommand(svc))
387+
a.ValidateFlows(ctx, pod, a.GetEgressRequirements(check.FlowParameters{
388+
DNSRequired: true,
389+
AltDstPort: svc.Port(),
390+
}))
391+
})
390392
})
391393
i++
392394
}

0 commit comments

Comments
 (0)