Skip to content

Conversation

giorio94
Copy link
Member

Remove a few pitfalls associated with option.NewNamedMapOptions, and simplify its API surface. Please refer to the individual commits for additional details.

giorio94 added 4 commits July 15, 2025 12:31
Remove a potential pitfall and ensure that NewMapOptions correctly
initializes the given map if nil, so that the values can be set
properly. Currently, instead, the map is initialized, but the
original pointer is not updated, which means that the caller has
no ways to see the configured values.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
The name parameter is only assigned, but never read, so we can drop it
to simplify the callers.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Rework the NewMapOptions validator to actually perform validation only,
rather than possibly mutating the values as well. Indeed, all validators
are always passing through the given value, except the BPFMapEventBuffers
one, but the returned values are never read in that case. Additionally,
let's make the set of validators variadic, so that we can drop the nil
parameter from all callers that don't set a validator.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. labels Jul 15, 2025
@giorio94
Copy link
Member Author

/test

@github-actions github-actions bot added the cilium-cli This PR contains changes related with cilium-cli label Jul 15, 2025
@giorio94 giorio94 marked this pull request as ready for review July 15, 2025 12:05
@giorio94 giorio94 requested review from a team as code owners July 15, 2025 12:05
@giorio94 giorio94 requested review from thorn3r, asauber and tklauser July 15, 2025 12:05
Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@giorio94 giorio94 enabled auto-merge July 15, 2025 12:16
@giorio94 giorio94 added this pull request to the merge queue Jul 16, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 16, 2025
Merged via the queue into cilium:main with commit 88bbfd4 Jul 16, 2025
86 checks passed
@giorio94 giorio94 deleted the mio/option-named-map branch July 16, 2025 19:37
zocimek added a commit to zocimek/home-ops that referenced this pull request Aug 25, 2025
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[aqua:cilium/cilium-cli](https://redirect.github.com/cilium/cilium-cli)
| patch | `0.18.5` -> `0.18.6` |

---

### Release Notes

<details>
<summary>cilium/cilium-cli (aqua:cilium/cilium-cli)</summary>

###
[`v0.18.6`](https://redirect.github.com/cilium/cilium-cli/releases/tag/v0.18.6)

[Compare
Source](https://redirect.github.com/cilium/cilium-cli/compare/v0.18.5...v0.18.6)

#### What's Changed

**Minor Changes:**

- Cilium uninstall now removes annotations from Kubernetes nodes when
clean-cilium-state: true
([cilium/cilium#39931](https://redirect.github.com/cilium/cilium/issues/39931),
[@&#8203;AritraDey-Dev](https://redirect.github.com/AritraDey-Dev))
- Deprecate `v2alpha1` version of `CiliumLoadBalancerIPPool` CRD in
favor of the `v2` version
([cilium/cilium#39134](https://redirect.github.com/cilium/cilium/issues/39134),
[@&#8203;pippolo84](https://redirect.github.com/pippolo84))

**Bugfixes:**

- Fix bug where we would display the Max Seq. Number for IPsec on
32bits.
([cilium/cilium#40622](https://redirect.github.com/cilium/cilium/issues/40622),
[@&#8203;pchaigno](https://redirect.github.com/pchaigno))

**CI Changes:**

- Add l7 proxy check for `to-fqdns` connectivity test
([cilium/cilium#40549](https://redirect.github.com/cilium/cilium/issues/40549),
[@&#8203;vipul-21](https://redirect.github.com/vipul-21))
- cli: switch coredns image to registry.k8s.io, and fix renovate
([cilium/cilium#40706](https://redirect.github.com/cilium/cilium/issues/40706),
[@&#8203;giorio94](https://redirect.github.com/giorio94))
- connectivity: Allow customization of tcpdump kill timeout
([cilium/cilium#40774](https://redirect.github.com/cilium/cilium/issues/40774),
[@&#8203;gentoo-root](https://redirect.github.com/gentoo-root))
- connectivity: rework sniffer to execute tcpdump in background
([cilium/cilium#40487](https://redirect.github.com/cilium/cilium/issues/40487),
[@&#8203;smagnani96](https://redirect.github.com/smagnani96))

**Misc Changes:**

- chore(deps): update docker.io/library/golang:1.24.4 docker digest to
[`20a022e`](https://redirect.github.com/cilium/cilium-cli/commit/20a022e)
(main)
([cilium/cilium#40379](https://redirect.github.com/cilium/cilium/issues/40379),
[@&#8203;cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot])
- chore(deps): update docker.io/library/golang:1.24.5 docker digest to
[`ef5b4be`](https://redirect.github.com/cilium/cilium-cli/commit/ef5b4be)
(main)
([cilium/cilium#40738](https://redirect.github.com/cilium/cilium/issues/40738),
[@&#8203;cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot])
- chore(deps): update go to v1.24.5 (main)
([cilium/cilium#40496](https://redirect.github.com/cilium/cilium/issues/40496),
[@&#8203;cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot])
- cilium-cli: Print partial output upon `bgp peers` errors
([cilium/cilium#40278](https://redirect.github.com/cilium/cilium/issues/40278),
[@&#8203;rastislavs](https://redirect.github.com/rastislavs))
- cilium-cli: Update default network-perf image
([cilium/cilium#40376](https://redirect.github.com/cilium/cilium/issues/40376),
[@&#8203;HadrienPatte](https://redirect.github.com/HadrienPatte))
- cilium-cli: Use slim k8s packages for connectivity tests
([cilium/cilium#40708](https://redirect.github.com/cilium/cilium/issues/40708),
[@&#8203;HadrienPatte](https://redirect.github.com/HadrienPatte))
- Fix misc typos
([cilium/cilium#40769](https://redirect.github.com/cilium/cilium/issues/40769),
[@&#8203;HadrienPatte](https://redirect.github.com/HadrienPatte))
- go.mod, vendor: pull in charts for Cilium 1.18.0 and Tetragon 1.5.0
([cilium/cilium#40823](https://redirect.github.com/cilium/cilium/issues/40823),
[@&#8203;tklauser](https://redirect.github.com/tklauser))
- Miscellaneous improvements to option.NewNamedMapOptions
([cilium/cilium#40529](https://redirect.github.com/cilium/cilium/issues/40529),
[@&#8203;giorio94](https://redirect.github.com/giorio94))
- The unableTranslateCIDRgroups variable is removed as it is not used
since the v1.17 release
([cilium/cilium#40267](https://redirect.github.com/cilium/cilium/issues/40267),
[@&#8203;Surya-7890](https://redirect.github.com/Surya-7890))
- vendor: Update github.com/google/go-github to v73
([cilium/cilium#40326](https://redirect.github.com/cilium/cilium/issues/40326),
[@&#8203;HadrienPatte](https://redirect.github.com/HadrienPatte))
- Update stable release to v0.18.5 by
[@&#8203;tklauser](https://redirect.github.com/tklauser) in
[https://github.com/cilium/cilium-cli/pull/3060](https://redirect.github.com/cilium/cilium-cli/pull/3060)
- chore(deps): update docker.io/library/golang:1.24.4 docker digest to
[`20a022e`](https://redirect.github.com/cilium/cilium-cli/commit/20a022e)
by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3061](https://redirect.github.com/cilium/cilium-cli/pull/3061)1
- Update RELEASE.md by
[@&#8203;michi-covalent](https://redirect.github.com/michi-covalent) in
[https://github.com/cilium/cilium-cli/pull/3062](https://redirect.github.com/cilium/cilium-cli/pull/3062)
- chore(deps): update golang docker tag to v1.24.5 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3063](https://redirect.github.com/cilium/cilium-cli/pull/3063)3
- chore(deps): update go to v1.24.5 (patch) by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3065](https://redirect.github.com/cilium/cilium-cli/pull/3065)5
- chore(deps): update golangci/golangci-lint docker tag to v2.2.2 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3066](https://redirect.github.com/cilium/cilium-cli/pull/3066)6
- chore(deps): update dependency cilium/cilium to v1.17.6 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3068](https://redirect.github.com/cilium/cilium-cli/pull/3068)8
- chore(deps): update golang:1.24.5-alpine3.21 docker digest to
[`3ebc008`](https://redirect.github.com/cilium/cilium-cli/commit/3ebc008)
by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3067](https://redirect.github.com/cilium/cilium-cli/pull/3067)7
- chore(deps): update golang:1.24.5-alpine3.21 docker digest to
[`72ff633`](https://redirect.github.com/cilium/cilium-cli/commit/72ff633)
by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3069](https://redirect.github.com/cilium/cilium-cli/pull/3069)9
- chore(deps): update golang:1.24.5-alpine3.21 docker digest to
[`6edc205`](https://redirect.github.com/cilium/cilium-cli/commit/6edc205)
by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3070](https://redirect.github.com/cilium/cilium-cli/pull/3070)0
- chore(deps): update golangci/golangci-lint docker tag to v2.3.0 -
autoclosed by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3071](https://redirect.github.com/cilium/cilium-cli/pull/3071)1
- chore(deps): update dependency cilium/cilium to v1.18.0 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3073](https://redirect.github.com/cilium/cilium-cli/pull/3073)3
- chore(deps): update docker.io/library/golang:1.24.5 docker digest to
[`ef5b4be`](https://redirect.github.com/cilium/cilium-cli/commit/ef5b4be)
by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
in[https://github.com/cilium/cilium-cli/pull/3072](https://redirect.github.com/cilium/cilium-cli/pull/3072)2
- Prepare for v0.18.6 release by
[@&#8203;tklauser](https://redirect.github.com/tklauser) in
[https://github.com/cilium/cilium-cli/pull/3074](https://redirect.github.com/cilium/cilium-cli/pull/3074)

**Full Changelog**:
cilium/cilium-cli@v0.18.5...v0.18.6

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/zocimek/home-ops).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40My41IiwidXBkYXRlZEluVmVyIjoiNDEuNDYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9wYXRjaCJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Łukasz Pospiech <zocimek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli kind/cleanup This includes no functional changes. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants