Repository: metallb/metallb
Pull request #2342 (2024-03-27 02:21:52)

Bump github.com/onsi/gomega from 1.30.0 to 1.32.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.30.0 to 1.32.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/onsi/gomega/releases">github.com/onsi/gomega's releases</a>.</em></p>
<blockquote>
<h2>v1.32.0</h2>
<h2>1.32.0</h2>
<h3>Maintenance</h3>
<ul>
<li>
<p>Migrate github.com/golang/protobuf to google.golang.org/protobuf [436a197]</p>
<p>This release drops the deprecated github.com/golang/protobuf and adopts google.golang.org/protobuf.  Care was taken to ensure the release is backwards compatible (thanks <a href="https://github.com/jbduncan"><code>@​jbduncan</code></a> !).  Please open an issue if you run into one.</p>
</li>
<li>
<p>chore: test with Go 1.22 (<a href="https://redirect.github.com/onsi/gomega/issues/733">#733</a>) [32ef35e]</p>
</li>
<li>
<p>Bump golang.org/x/net from 0.19.0 to 0.20.0 (<a href="https://redirect.github.com/onsi/gomega/issues/717">#717</a>) [a0d0387]</p>
</li>
<li>
<p>Bump github-pages and jekyll-feed in /docs (<a href="https://redirect.github.com/onsi/gomega/issues/732">#732</a>) [b71e477]</p>
</li>
<li>
<p>docs: fix typo and broken anchor link to gstruct [f460154]</p>
</li>
<li>
<p>docs: fix HaveEach matcher signature [a2862e4]</p>
</li>
</ul>
<h2>v1.31.1</h2>
<h2>1.31.1</h2>
<h3>Fixes</h3>
<ul>
<li>Inverted arguments order of FailureMessage of BeComparableToMatcher [e0dd999]</li>
<li>Update test in case keeping msg is desired [ad1a367]</li>
</ul>
<h3>Maintenance</h3>
<ul>
<li>Show how to import the format sub package [24e958d]</li>
<li>tidy up go.sum [26661b8]</li>
<li>bump dependencies [bde8f7a]</li>
</ul>
<h2>v1.31.0</h2>
<h2>1.31.0</h2>
<h3>Features</h3>
<ul>
<li>Async assertions include context cancellation cause if present [121c37f]</li>
</ul>
<h3>Maintenance</h3>
<ul>
<li>Bump minimum go version [dee1e3c]</li>
<li>docs: fix typo in example usage &quot;occured&quot; -&gt; &quot;occurred&quot; [49005fe]</li>
<li>Bump actions/setup-go from 4 to 5 (<a href="https://redirect.github.com/onsi/gomega/issues/714">#714</a>) [f1c8757]</li>
<li>Bump github/codeql-action from 2 to 3 (<a href="https://redirect.github.com/onsi/gomega/issues/715">#715</a>) [9836e76]</li>
<li>Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.2 (<a href="https://redirect.github.com/onsi/gomega/issues/713">#713</a>) [54726f0]</li>
<li>Bump golang.org/x/net from 0.17.0 to 0.19.0 (<a href="https://redirect.github.com/onsi/gomega/issues/711">#711</a>) [df97ecc]</li>
<li>docs: fix <code>HaveExactElement</code> typo (<a href="https://redirect.github.com/onsi/gomega/issues/712">#712</a>) [a672c86]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/onsi/gomega/blob/master/CHANGELOG.md">github.com/onsi/gomega's changelog</a>.</em></p>
<blockquote>
<h2>1.32.0</h2>
<h3>Maintenance</h3>
<ul>
<li>
<p>Migrate github.com/golang/protobuf to google.golang.org/protobuf [436a197]</p>
<p>This release drops the deprecated github.com/golang/protobuf and adopts google.golang.org/protobuf.  Care was taken to ensure the release is backwards compatible (thanks <a href="https://github.com/jbduncan"><code>@​jbduncan</code></a> !).  Please open an issue if you run into one.</p>
</li>
<li>
<p>chore: test with Go 1.22 (<a href="https://redirect.github.com/onsi/gomega/issues/733">#733</a>) [32ef35e]</p>
</li>
<li>
<p>Bump golang.org/x/net from 0.19.0 to 0.20.0 (<a href="https://redirect.github.com/onsi/gomega/issues/717">#717</a>) [a0d0387]</p>
</li>
<li>
<p>Bump github-pages and jekyll-feed in /docs (<a href="https://redirect.github.com/onsi/gomega/issues/732">#732</a>) [b71e477]</p>
</li>
<li>
<p>docs: fix typo and broken anchor link to gstruct [f460154]</p>
</li>
<li>
<p>docs: fix HaveEach matcher signature [a2862e4]</p>
</li>
</ul>
<h2>1.31.1</h2>
<h3>Fixes</h3>
<ul>
<li>Inverted arguments order of FailureMessage of BeComparableToMatcher [e0dd999]</li>
<li>Update test in case keeping msg is desired [ad1a367]</li>
</ul>
<h3>Maintenance</h3>
<ul>
<li>Show how to import the format sub package [24e958d]</li>
<li>tidy up go.sum [26661b8]</li>
<li>bump dependencies [bde8f7a]</li>
</ul>
<h2>1.31.0</h2>
<h3>Features</h3>
<ul>
<li>Async assertions include context cancellation cause if present [121c37f]</li>
</ul>
<h3>Maintenance</h3>
<ul>
<li>Bump minimum go version [dee1e3c]</li>
<li>docs: fix typo in example usage &quot;occured&quot; -&gt; &quot;occurred&quot; [49005fe]</li>
<li>Bump actions/setup-go from 4 to 5 (<a href="https://redirect.github.com/onsi/gomega/issues/714">#714</a>) [f1c8757]</li>
<li>Bump github/codeql-action from 2 to 3 (<a href="https://redirect.github.com/onsi/gomega/issues/715">#715</a>) [9836e76]</li>
<li>Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.2 (<a href="https://redirect.github.com/onsi/gomega/issues/713">#713</a>) [54726f0]</li>
<li>Bump golang.org/x/net from 0.17.0 to 0.19.0 (<a href="https://redirect.github.com/onsi/gomega/issues/711">#711</a>) [df97ecc]</li>
<li>docs: fix <code>HaveExactElement</code> typo (<a href="https://redirect.github.com/onsi/gomega/issues/712">#712</a>) [a672c86]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/onsi/gomega/commit/437995126acee58e6237f963913f54cb6386dd0a"><code>4379951</code></a> v1.32.0</li>
<li><a href="https://github.com/onsi/gomega/commit/a350b95475d80b6139762e3ae405072a660ead1c"><code>a350b95</code></a> Maintain source backwards compatibility</li>
<li><a href="https://github.com/onsi/gomega/commit/a6c8875c9101b27be67e57288b6bc95863f470ee"><code>a6c8875</code></a> Fix failing test</li>
<li><a href="https://github.com/onsi/gomega/commit/436a197c11fbafe8f356f6e8bd2cc0e01bfc4324"><code>436a197</code></a> Migrate github.com/golang/protobuf to google.golang.org/protobuf</li>
<li><a href="https://github.com/onsi/gomega/commit/32ef35ea6e233acc84502d9ec90c106aeec1615d"><code>32ef35e</code></a> chore: test with Go 1.22 (<a href="https://redirect.github.com/onsi/gomega/issues/733">#733</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/a0d0387c676ecbc28ce60dd2c16dd7a6900d645e"><code>a0d0387</code></a> Bump golang.org/x/net from 0.19.0 to 0.20.0 (<a href="https://redirect.github.com/onsi/gomega/issues/717">#717</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/b71e47766573f9c48c5b306a1afdd143b9f46e42"><code>b71e477</code></a> Bump github-pages and jekyll-feed in /docs (<a href="https://redirect.github.com/onsi/gomega/issues/732">#732</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/f4601547eab6c872dabcd88064c50ba8eb5408cf"><code>f460154</code></a> docs: fix typo and broken anchor link to gstruct</li>
<li><a href="https://github.com/onsi/gomega/commit/a2862e41f3f866e4d37c940a33e25827e504cfed"><code>a2862e4</code></a> docs: fix HaveEach matcher signature</li>
<li><a href="https://github.com/onsi/gomega/commit/762b171852113d80d8fc360558cccbccdc46af70"><code>762b171</code></a> v1.31.1</li>
<li>Additional commits viewable in <a href="https://github.com/onsi/gomega/compare/v1.30.0...v1.32.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/onsi/gomega&package-manager=go_modules&previous-version=1.30.0&new-version=1.32.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

fedepaol: @dependabot recreate

Patch:
diff --git a/.github/workflows/classify.yaml b/.github/workflows/classify.yaml
index 17a6c69a..af02df4d 100644
--- a/.github/workflows/classify.yaml
+++ b/.github/workflows/classify.yaml
@@ -7,6 +7,7 @@ on:
 jobs:
   add_labels:
     runs-on: ubuntu-latest
+    if: github.actor != 'dependabot[bot]'
     steps:
       - name: checkout
         uses: actions/checkout@v4
diff --git a/configmaptocrs/Dockerfile b/configmaptocrs/Dockerfile
index c4a0c98c..59ae08df 100644
--- a/configmaptocrs/Dockerfile
+++ b/configmaptocrs/Dockerfile
@@ -1,12 +1,12 @@
 # syntax=docker/dockerfile:1.2
 
-FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.8 AS builder
+FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.9 AS builder
 WORKDIR $GOPATH/go.universe.tf/metallb
 
 RUN --mount=type=cache,target=/go/pkg/mod/ \
-    --mount=type=bind,source=go.sum,target=go.sum \
-    --mount=type=bind,source=go.mod,target=go.mod \
-    go mod download -x
+  --mount=type=bind,source=go.sum,target=go.sum \
+  --mount=type=bind,source=go.mod,target=go.mod \
+  go mod download -x
 
 ARG GIT_COMMIT=dev
 ARG GIT_BRANCH=dev
diff --git a/controller/Dockerfile b/controller/Dockerfile
index 5e0a4da3..c26bcdcf 100644
--- a/controller/Dockerfile
+++ b/controller/Dockerfile
@@ -1,12 +1,12 @@
 # syntax=docker/dockerfile:1.2
 
-FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.8 AS builder
+FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.9 AS builder
 WORKDIR $GOPATH/go.universe.tf/metallb
 
 RUN --mount=type=cache,target=/go/pkg/mod/ \
-    --mount=type=bind,source=go.sum,target=go.sum \
-    --mount=type=bind,source=go.mod,target=go.mod \
-    go mod download -x
+  --mount=type=bind,source=go.sum,target=go.sum \
+  --mount=type=bind,source=go.mod,target=go.mod \
+  go mod download -x
 
 ARG GIT_COMMIT=dev
 ARG GIT_BRANCH=dev
diff --git a/go.mod b/go.mod
index 977c71f0..d7cecbe7 100644
--- a/go.mod
+++ b/go.mod
@@ -13,12 +13,12 @@ require (
 	github.com/metallb/frr-k8s v0.0.11
 	github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721
 	github.com/onsi/ginkgo/v2 v2.17.1
-	github.com/onsi/gomega v1.30.0
+	github.com/onsi/gomega v1.32.0
 	github.com/open-policy-agent/cert-controller v0.10.1
 	github.com/ory/dockertest/v3 v3.10.0
 	github.com/pkg/errors v0.9.1
 	github.com/prometheus/client_golang v1.19.0
-	go.uber.org/zap v1.26.0
+	go.uber.org/zap v1.27.0
 	golang.org/x/sys v0.18.0
 	k8s.io/api v0.29.3
 	k8s.io/apiextensions-apiserver v0.29.3
diff --git a/go.sum b/go.sum
index 40084757..6ef18976 100644
--- a/go.sum
+++ b/go.sum
@@ -193,8 +193,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
 github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
 github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
-github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
-github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
+github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk=
+github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg=
 github.com/open-policy-agent/cert-controller v0.10.1 h1:RXSYoyn8FdCenWecRP//UV5nbVfmstNpj4kHQFkvPK4=
 github.com/open-policy-agent/cert-controller v0.10.1/go.mod h1:4uRbBLY5DsPOog+a9pqk3JLxuuhrWsbUedQW65HcLTI=
 github.com/open-policy-agent/frameworks/constraint v0.0.0-20230822235116-f0b62fe1e4c4 h1:5dum5SLEz+95JDLkMls7Z7IDPjvSq3UhJSFe4f5einQ=
@@ -275,8 +275,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
 go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
 go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
 go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
-go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
-go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
+go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
+go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
diff --git a/internal/bgp/frr/config.go b/internal/bgp/frr/config.go
index 7ffcc88a..9a7a7626 100644
--- a/internal/bgp/frr/config.go
+++ b/internal/bgp/frr/config.go
@@ -182,7 +182,7 @@ func templateConfig(data interface{}) (string, error) {
 	return b.String(), err
 }
 
-// writeConfigFile writes the FRR configuration file (represented as a string)
+// writeConfig writes the FRR configuration file (represented as a string)
 // to 'filename'.
 func writeConfig(config string, filename string) error {
 	return os.WriteFile(filename, []byte(config), 0600)
diff --git a/internal/k8s/epslices/endpoint_slices.go b/internal/k8s/epslices/endpoint_slices.go
index e4d0c0b6..8dfa8cec 100644
--- a/internal/k8s/epslices/endpoint_slices.go
+++ b/internal/k8s/epslices/endpoint_slices.go
@@ -11,16 +11,15 @@ import (
 
 const SlicesServiceIndexName = "ServiceName"
 
-// IsConditionServing tells if the conditions represent a serving state, deferring
-// to ready state if serving == nil.
-func IsConditionServing(conditions discovery.EndpointConditions) bool {
-	if conditions.Serving == nil {
-		if conditions.Ready == nil {
-			return true
-		}
-		return *conditions.Ready
+// EndpointCanServe tells if the conditions represent a ready state or serving state is ready.
+func EndpointCanServe(conditions discovery.EndpointConditions) bool {
+	if conditions.Ready == nil || *conditions.Ready {
+		return true
 	}
-	return *conditions.Serving
+	if conditions.Serving != nil && *conditions.Serving {
+		return true
+	}
+	return false
 }
 
 func ServiceKeyForSlice(endpointSlice *discovery.EndpointSlice) (types.NamespacedName, error) {
diff --git a/internal/k8s/webhooks/webhookv1beta1/l2advertisement_webhook.go b/internal/k8s/webhooks/webhookv1beta1/l2advertisement_webhook.go
index c68e955b..0c99d3df 100644
--- a/internal/k8s/webhooks/webhookv1beta1/l2advertisement_webhook.go
+++ b/internal/k8s/webhooks/webhookv1beta1/l2advertisement_webhook.go
@@ -118,7 +118,7 @@ func validateL2AdvCreate(l2Adv *v1beta1.L2Advertisement) error {
 	return nil
 }
 
-// validateL2Update implements webhook.Validator so a webhook will be registered for v1beta1.L2Advertisement.
+// validateL2AdvUpdate implements webhook.Validator so a webhook will be registered for v1beta1.L2Advertisement.
 func validateL2AdvUpdate(l2Adv *v1beta1.L2Advertisement, _ *v1beta1.L2Advertisement) error {
 	level.Debug(Logger).Log("webhook", "v1beta1.L2Advertisement", "action", "update", "name", l2Adv.Name, "namespace", l2Adv.Namespace)
 
diff --git a/speaker/Dockerfile b/speaker/Dockerfile
index aeaf8f1c..670af170 100644
--- a/speaker/Dockerfile
+++ b/speaker/Dockerfile
@@ -1,12 +1,12 @@
 # syntax=docker/dockerfile:1.2
 
-FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.8 AS builder
+FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.9 AS builder
 WORKDIR $GOPATH/go.universe.tf/metallb
 
 RUN --mount=type=cache,target=/go/pkg/mod/ \
-    --mount=type=bind,source=go.sum,target=go.sum \
-    --mount=type=bind,source=go.mod,target=go.mod \
-    go mod download -x
+  --mount=type=bind,source=go.sum,target=go.sum \
+  --mount=type=bind,source=go.mod,target=go.mod \
+  go mod download -x
 
 ARG GIT_COMMIT=dev
 ARG GIT_BRANCH=dev
diff --git a/speaker/bgp_controller.go b/speaker/bgp_controller.go
index 5351cd36..244b9ee9 100644
--- a/speaker/bgp_controller.go
+++ b/speaker/bgp_controller.go
@@ -125,13 +125,13 @@ func hasHealthyEndpoint(eps []discovery.EndpointSlice, filterNode func(*string)
 				continue
 			}
 			for _, addr := range ep.Addresses {
-				if _, ok := ready[addr]; !ok && epslices.IsConditionServing(ep.Conditions) {
+				if _, ok := ready[addr]; !ok && epslices.EndpointCanServe(ep.Conditions) {
 					// Only set true if nothing else has expressed an
 					// opinion. This means that false will take precedence
 					// if there's any unready ports for a given endpoint.
 					ready[addr] = true
 				}
-				if !epslices.IsConditionServing(ep.Conditions) {
+				if !epslices.EndpointCanServe(ep.Conditions) {
 					ready[addr] = false
 				}
 			}
diff --git a/speaker/layer2_controller.go b/speaker/layer2_controller.go
index 175ad808..77055934 100644
--- a/speaker/layer2_controller.go
+++ b/speaker/layer2_controller.go
@@ -54,7 +54,7 @@ func usableNodes(eps []discovery.EndpointSlice, speakers map[string]bool) []stri
 	usable := map[string]bool{}
 	for _, slice := range eps {
 		for _, ep := range slice.Endpoints {
-			if !epslices.IsConditionServing(ep.Conditions) {
+			if !epslices.EndpointCanServe(ep.Conditions) {
 				continue
 			}
 			if ep.NodeName == nil {
@@ -204,7 +204,7 @@ func nodesWithActiveSpeakers(speakers map[string]bool) []string {
 func activeEndpointExists(eps []discovery.EndpointSlice) bool {
 	for _, slice := range eps {
 		for _, ep := range slice.Endpoints {
-			if !epslices.IsConditionServing(ep.Conditions) {
+			if !epslices.EndpointCanServe(ep.Conditions) {
 				continue
 			}
 			return true


Test patch:
diff --git a/e2etest/pkg/frr/bgp.go b/e2etest/pkg/frr/bgp.go
index 9eff0019..dacd1576 100644
--- a/e2etest/pkg/frr/bgp.go
+++ b/e2etest/pkg/frr/bgp.go
@@ -16,7 +16,7 @@ import (
 // useful for fetching informations from FRR (such as metrics) and we may need to move it
 // to metallb.
 
-// NeighborForContainer returns informations for the given neighbor in the given
+// NeighborInfo returns informations for the given neighbor in the given
 // executor.
 func NeighborInfo(neighborName string, exec executor.Executor) (*Neighbor, error) {
 	res, err := exec.Exec("vtysh", "-c", fmt.Sprintf("show bgp neighbor %s json", neighborName))
@@ -31,7 +31,7 @@ func NeighborInfo(neighborName string, exec executor.Executor) (*Neighbor, error
 	return neighbor, nil
 }
 
-// NeighborsForContainer returns informations for the all the neighbors in the given
+// NeighborsInfo returns informations for the all the neighbors in the given
 // executor.
 func NeighborsInfo(exec executor.Executor) ([]*Neighbor, error) {
 	res, err := exec.Exec("vtysh", "-c", "show bgp neighbor json")
diff --git a/internal/k8s/epslices/endpoint_slices_test.go b/internal/k8s/epslices/endpoint_slices_test.go
new file mode 100644
index 00000000..4266ec0b
--- /dev/null
+++ b/internal/k8s/epslices/endpoint_slices_test.go
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier:Apache-2.0
+
+package epslices
+
+import (
+	"testing"
+
+	v1 "k8s.io/api/discovery/v1"
+	"k8s.io/utils/ptr"
+)
+
+func TestIsConditionReadyOrServing(t *testing.T) {
+	tests := []struct {
+		name       string
+		conditions v1.EndpointConditions
+		want       bool
+	}{
+		{
+			name: "Is Ready",
+			conditions: v1.EndpointConditions{
+				Ready: ptr.To(true),
+			},
+			want: true,
+		},
+		{
+			name: "Is Serving",
+			conditions: v1.EndpointConditions{
+				Serving: ptr.To(true),
+			},
+			want: true,
+		},
+		{
+			name: "Is Ready but not serving",
+			conditions: v1.EndpointConditions{
+				Ready:   ptr.To(true),
+				Serving: ptr.To(false),
+			},
+			want: true,
+		},
+		{
+			name:       "Ready and Serving not set",
+			conditions: v1.EndpointConditions{},
+			want:       true,
+		},
+		{
+			name: "Ready not set and not serving",
+			conditions: v1.EndpointConditions{
+				Serving: ptr.To(false),
+			},
+			want: true,
+		},
+		{
+			name: "Not Ready",
+			conditions: v1.EndpointConditions{
+				Ready: ptr.To(false),
+			},
+			want: false,
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			if got := EndpointCanServe(tt.conditions); got != tt.want {
+				t.Errorf("EndpointCanServe() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
diff --git a/speaker/bgp_controller_test.go b/speaker/bgp_controller_test.go
index 725b385a..e11f6e53 100644
--- a/speaker/bgp_controller_test.go
+++ b/speaker/bgp_controller_test.go
@@ -617,6 +617,41 @@ func TestBGPSpeakerEPSlices(t *testing.T) {
 			},
 		},
 
+		{
+			desc:     "Endpoint list contains ready but not serving endpoints",
+			balancer: "test1",
+			svc: &v1.Service{
+				Spec: v1.ServiceSpec{
+					Type:                  "LoadBalancer",
+					ExternalTrafficPolicy: "Cluster",
+				},
+				Status: statusAssigned("10.20.30.1"),
+			},
+			eps: []discovery.EndpointSlice{
+				{
+					Endpoints: []discovery.Endpoint{
+						{
+							Addresses: []string{
+								"2.3.4.5",
+							},
+							NodeName: ptr.To("iris"),
+							Conditions: discovery.EndpointConditions{
+								Ready:   ptr.To(true),
+								Serving: ptr.To(false),
+							},
+						},
+					},
+				},
+			},
+			wantAds: map[string][]*bgp.Advertisement{
+				"1.2.3.4:0": {
+					{
+						Prefix: ipnet("10.20.30.1/32"),
+					},
+				},
+			},
+		},
+
 		{
 			desc: "Multiple advertisement config",
 			config: &config.Config{
diff --git a/speaker/layer2_controller_test.go b/speaker/layer2_controller_test.go
index ad640ce6..572fc878 100644
--- a/speaker/layer2_controller_test.go
+++ b/speaker/layer2_controller_test.go
@@ -222,6 +222,37 @@ func TestUsableNodesEPSlices(t *testing.T) {
 			usableSpeakers:  map[string]bool{"iris1": true, "iris2": true},
 			cExpectedResult: []string{"iris1", "iris2"},
 		},
+		{
+			desc: "Two endpoints, different hosts, ready but not serving",
+			eps: []discovery.EndpointSlice{
+				{
+					Endpoints: []discovery.Endpoint{
+						{
+							Addresses: []string{
+								"2.3.4.5",
+							},
+							NodeName: ptr.To("iris1"),
+							Conditions: discovery.EndpointConditions{
+								Ready:   ptr.To(true),
+								Serving: ptr.To(false),
+							},
+						},
+						{
+							Addresses: []string{
+								"2.3.4.15",
+							},
+							NodeName: ptr.To("iris2"),
+							Conditions: discovery.EndpointConditions{
+								Ready:   ptr.To(true),
+								Serving: ptr.To(false),
+							},
+						},
+					},
+				},
+			},
+			usableSpeakers:  map[string]bool{"iris1": true, "iris2": true},
+			cExpectedResult: []string{"iris1", "iris2"},
+		},
 	}
 
 	for _, test := range tests {