Skip to content

Tracking: upstream MetalLB fixes filed during v0.16.0 bump (cozystack#2699) #2714

Open

Description

During the MetalLB v0.16.0 bump in #2699, several real upstream bugs surfaced in metallb/metallb and metallb/frr-k8s Helm charts and CRDs. All five were filed upstream as PRs; cozystack carries a corresponding workaround for one of them (the install-time nil pointer) in packages/system/metallb/values.yaml. This issue tracks landings so the workaround can be dropped on the next MetalLB chart bump.

Upstream PRs

  • metallb/metallb#3054 — fix(api): correct LocalASN OpenAPI format to int64. BGPPeer.spec.localASN declared Maximum=4294967295 with no Format annotation, so the generated CRD claimed format: int32 (whose max is 2,147,483,647). Schema-only fix.
  • metallb/metallb#3055 — fix(chart): emit prometheus.io/scheme=https across all annotation paths. v0.16.0 moved metrics to HTTPS-only on port 9120, but pod-level annotations, PodMonitor, and the annotation-only Service objects bundled with the ServiceMonitor still pointed at HTTP. Annotation-based Prometheus scrape fails with TLS handshake error.
  • metallb/metallb#3057 — fix(chart): tighten speaker.bgpDebounceTimeout schema to minimum 1. The schema admitted 0, which the speaker binary rejects with os.Exit(1) (speaker/main.go:134). Aligns helm-time validation with the runtime contract.
  • metallb/metallb#3058 — helm: fix frr-k8s subchart values to prevent nil pointer errors. Merged 2026-05-21 by upstream maintainer (fedepaol). The parent chart's frr-k8s.prometheus: placeholder block parsed as a null map, clobbering the subchart's prometheus defaults via Helm value deep-merge. Aborted helm install with a nil pointer at frr-k8s/templates/service-monitor.yaml. This is the root cause of the e2e failure on chore(metallb): bump to v0.16.1 and rotate host-network port denylist #2699 that the cozystack workaround addresses. Our own duplicate (#3059) was closed in favor of this one.
  • metallb/frr-k8s#447 — fix(chart): correct values.schema.json structure and types. Four bugs in one file: trailing-colon typo on frrk8s.frr.resources; integer-only serviceMonitor.interval (Prometheus convention is a duration string); crds and frrk8s blocks misplaced under prometheus, where JSON Schema silently ignores them.

Cozystack-side workaround

packages/system/metallb/values.yaml pins:

metallb:
  frr-k8s:
    prometheus:
      serviceMonitor:
        enabled: false
      podMonitor:
        enabled: false

to sidestep the null-merge install-time crash that #3058 fixes upstream. Once a MetalLB chart release containing #3058 lands and packages/system/metallb consumes it, this override block can be removed from the cozystack values.yaml.

Definition of done

Activity

  1. added
    kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debt
    area/networkingIssues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn)
    on May 21, 2026
  2. lexfrei commented on May 21, 2026

    @lexfrei
    ContributorAuthor

    metallb/metallb#3058 was opened by fedepaol (upstream maintainer) ~7 hours before our #3059 and merged 2026-05-21T16:17 UTC. Same root cause, different shape: he replaces frr-k8s.prometheus: null with frr-k8s.prometheus.serviceMonitor.enabled: false (explicit value, no clobber); we replaced it with frr-k8s: {} (empty map, subchart defaults stand). Both fix the deep-merge nil dereference. His version is strictly more thorough — also adds helm-docs # -- annotations on frrk8s.{enabled,external,namespace} that we did not touch, and a comment pointer to the subchart values.yaml upstream URL.

    Verified compatibility:

    • After fetching the updated subchart tarball (the prior cached frr-k8s-0.0.25.tgz was stale and masked the test), helm template metallb charts/metallb --set crds.enabled=true renders cleanly on current main (post-3058).
    • Our cozystack outer override (metallb.frr-k8s.prometheus.{serviceMonitor,podMonitor}.enabled: false) remains compatible — same shape, no conflict with the new explicit upstream defaults.

    No follow-up needed on our side. Removal of the cozystack workaround stays gated on a MetalLB chart release containing #3058, per the Definition of Done above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingIssues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions