Skip to content

Commit 9c46e44

Browse files
committed
chore(metallb): bump to v0.16.0 and rotate host-network port denylist
Upgrade vendored MetalLB chart from 0.15.2 to 0.16.0 and rebuild the cozystack-built controller / speaker images at the new version. Adopt the upstream-default BGP backend: FRR-K8s replaces the deprecated FRR mode. Rotate the cilium-networkpolicy clusterwide host-network port denylist to match the new metallb endpoints. The Makefile now vendors the frr-k8s subchart instead of dropping it, and pins the chart version so future make update invocations are deterministic. Upstream highlights between 0.15.2 and 0.16.0: - 0.16.0: FRR-K8s is the new default BGP backend; legacy FRR is deprecated. - 0.16.0: new probe contract — metallb controller and speaker serve /healthz and /readyz on a dedicated host-local health port 17472 (distinct from the metrics port). The frr-k8s controller uses its own host-local probe port 7572. The cozystack-built image must move in lockstep with the chart so probes resolve against the new endpoints. - 0.16.0: kube-rbac-proxy is replaced by native TLS; metrics endpoints are HTTPS-only, served on the formerly-rbac-proxy port 9120. Default TLS minimum is now 1.3 (was 1.2); operators with TLS 1.2 scrapers override via metallb.tls.minVersion: VersionTLS12. - 0.16.0: new tls.* and networkpolicies.* value blocks (opt-in defaults). - 0.15.3: ConfigurationState CRD exposes reconcile errors per component; Helm chart gained NetworkPolicy support and tightened pod SecurityContext. Adaptations: - packages/system/metallb/Makefile: pin helm pull --version 0.16.0; remove the rm -rf charts/metallb/charts/frr-k8s line so the new default BGP backend ships with the chart; add a test: target running helm unittest. - packages/system/metallb/charts/metallb/: regenerated via make update. - packages/system/metallb/values.yaml: cozystack-built controller and speaker image tags moved to v0.16.0 with fresh digests pushed to ghcr.io/cozystack/cozystack. The chart's new probe contract requires the v0.16.x binary; leaving the digests on v0.15.2 would CrashLoopBackOff every pod on main between merge and the next release-prep commit. A header comment documents the backend default switch, the metrics-port move (7472 HTTP → 9120 HTTPS), the new TLS 1.3 default, the new host-network ports (9140, 9141, 19443), and the partial nature of the FRR-mode escape hatch — flipping metallb.frrk8s.enabled=false plus metallb.speaker.frr.enabled=true switches the speaker but does not suppress the idle frr-k8s subchart, because Helm evaluates a dep's `condition:` against the declaring chart's own values context and a grandparent override from the umbrella cannot reach that resolution. - packages/system/metallb/tests/metallb_test.yaml: new helm-unittest suite pinning post-bump invariants — speaker is the single-container daemonset, BGP_TYPE is frr-k8s, frr-k8s daemonset and CRDs are installed, NetworkPolicies stay off by default, controller/speaker image tags exactly match the chart appVersion (the test that would have caught the chart / binary skew up-front), and the documented FRR-mode escape hatch is pinned in both halves (speaker switches to four-container FRR layout, frr-k8s subchart still renders idle — the latter test is the contract that a future cleanup must update together with the values.yaml note). - packages/system/cilium-networkpolicy/templates/networkpolicy.yaml: drop the stale FRR-mode metrics port 7473; add every metallb v0.16 host-network listener that this policy file is responsible for — 7946 (speaker memberlist gossip, TCP/UDP; cluster peers still reach it via the same policy's ingress fromEntities[cluster,host] clause), 9120 (speaker metrics), 9121 (legacy FRR metrics, kept defensively so the documented escape hatch stays safe), 9140 (frr-k8s controller metrics), 9141 (frr-k8s FRR metrics), 19443 (frr-k8s statuscleaner webhook). Port 9443 stays in the deny list with a tightened comment: the host-network bind belongs to the etcd kube-rbac-proxy DaemonSet in cozy-monitoring; the metallb controller webhook collides on the same port number but on pod-IP, out of scope for a world-deny. - packages/system/cilium-networkpolicy/tests/networkpolicy_test.yaml: new helm-unittest suite that enumerates every metallb v0.16 host-network port in the deny list (including 7946 memberlist and the escape-hatch 9121), pins port 9443 to its etcd kube-rbac-proxy owner with the pod-IP collision note, and asserts the legacy 7473 entry is gone. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent ce8e738 commit 9c46e44

44 files changed

Lines changed: 3362 additions & 264 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/system/cilium-networkpolicy/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ export NAMESPACE=cozy-$(NAME)
33

44
include ../../../hack/common-envs.mk
55
include ../../../hack/package.mk
6+
7+
test:
8+
helm unittest .

‎packages/system/cilium-networkpolicy/templates/networkpolicy.yaml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ spec:
1212
- port: "2379" # etcd
1313
- port: "2380" # etcd
1414
- port: "3367" # linstor
15-
- port: "7473" # frr-metrics (metallb)
15+
- port: "7946" # metallb speaker memberlist gossip (TCP/UDP, host-network); cluster peers still reach it via the ingress fromEntities[cluster,host] clause below
1616
- port: "8123" # cozy assets server
17-
- port: "9443" # kube-rbac-proxy
17+
- port: "9120" # metallb speaker metrics (HTTPS, host-network)
18+
- port: "9121" # metallb legacy FRR metrics (HTTPS, host-network; only bound when speaker.frr.enabled=true escape hatch is engaged)
19+
- port: "9140" # metallb frr-k8s controller metrics (HTTPS, host-network)
20+
- port: "9141" # metallb frr-k8s FRR metrics (HTTPS, host-network)
21+
- port: "9443" # etcd kube-rbac-proxy host-network bind (cozy-monitoring DaemonSet); metallb controller also binds 9443 on pod-IP for its webhook — pod-IP is out of scope for this world-deny but the port number collides
1822
- port: "10250" # kubelet
1923
- port: "10257" # kube-controller-manager
2024
- port: "10259" # kube-scheduler
25+
- port: "19443" # metallb frr-k8s statuscleaner webhook (HTTPS, host-network)
2126
ingress:
2227
- fromEntities:
2328
- world
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
suite: cilium-networkpolicy port-deny invariants
2+
release:
3+
name: cilium-networkpolicy
4+
namespace: cozy-cilium-networkpolicy
5+
templates:
6+
- templates/networkpolicy.yaml
7+
tests:
8+
- it: denies world ingress to every metallb v0.16 host-network listener
9+
# These ports are opened on host-network by metallb v0.16:
10+
# 7946 — speaker memberlist gossip (TCP/UDP). Cluster peers still
11+
# reach it via the ingress fromEntities[cluster,host] clause
12+
# on the same policy; the deny only blocks `world`.
13+
# 9120 — speaker metrics (HTTPS).
14+
# 9121 — legacy FRR metrics (HTTPS, only bound when the escape hatch
15+
# speaker.frr.enabled=true is engaged; kept in the denylist
16+
# defensively so the escape hatch stays safe).
17+
# 9140 — frr-k8s controller metrics (HTTPS, DaemonSet).
18+
# 9141 — frr-k8s FRR metrics (HTTPS, DaemonSet).
19+
# 19443 — frr-k8s statuscleaner webhook (HTTPS, Deployment with
20+
# hostNetwork: true and master+control-plane tolerations).
21+
# The deny list MUST cover all six; missing any one leaks the
22+
# corresponding endpoint to world on any node that schedules the pod.
23+
# Port 9443 is bound on host-network by the cozy-monitoring etcd
24+
# kube-rbac-proxy DaemonSet — asserted separately below; metallb
25+
# controller webhook collides on the same port number but on pod-IP,
26+
# out of scope for this world-deny.
27+
asserts:
28+
- contains:
29+
path: spec.ingressDeny[0].toPorts[0].ports
30+
content:
31+
port: "7946"
32+
- contains:
33+
path: spec.ingressDeny[0].toPorts[0].ports
34+
content:
35+
port: "9120"
36+
- contains:
37+
path: spec.ingressDeny[0].toPorts[0].ports
38+
content:
39+
port: "9121"
40+
- contains:
41+
path: spec.ingressDeny[0].toPorts[0].ports
42+
content:
43+
port: "9140"
44+
- contains:
45+
path: spec.ingressDeny[0].toPorts[0].ports
46+
content:
47+
port: "9141"
48+
- contains:
49+
path: spec.ingressDeny[0].toPorts[0].ports
50+
content:
51+
port: "19443"
52+
53+
- it: denies world ingress to the host-network 9443 listener (etcd kube-rbac-proxy)
54+
# The host-network bind on port 9443 belongs to the cozy-monitoring
55+
# kube-rbac-proxy DaemonSet
56+
# (packages/system/monitoring-agents/templates/etcd-proxy-scrape.yaml,
57+
# --secure-listen-address=$(NODE_IP):9443). Port 9443 is ALSO bound by
58+
# the metallb controller Deployment as its webhook server, but on pod-IP
59+
# (non-host-network), which is out of scope for this world-deny. Pin the
60+
# entry here so a future PR that drops the cozy-monitoring stack does
61+
# not silently remove this deny — the port-number collision with the
62+
# metallb controller webhook does not give that webhook any protection
63+
# under this policy regardless.
64+
asserts:
65+
- contains:
66+
path: spec.ingressDeny[0].toPorts[0].ports
67+
content:
68+
port: "9443"
69+
70+
- it: drops the stale frr-mode metrics port now that frrk8s is the default
71+
# Port 7473 was metallb's legacy FRR-mode metrics endpoint. v0.16 disables
72+
# FRR mode by default and migrates BGP to frr-k8s; the port is no longer
73+
# bound by anything cozystack ships, so listing it in the deny rule is
74+
# misleading.
75+
asserts:
76+
- notContains:
77+
path: spec.ingressDeny[0].toPorts[0].ports
78+
content:
79+
port: "7473"

‎packages/system/metallb/Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ update:
88
rm -rf charts
99
helm repo add metallb https://metallb.github.io/metallb
1010
helm repo update metallb
11-
helm pull metallb/metallb --untar --untardir charts
12-
rm -rf charts/metallb/charts/frr-k8s
11+
helm pull metallb/metallb --version 0.16.0 --untar --untardir charts
12+
13+
test:
14+
helm unittest .
1315

1416
image-controller image-speaker:
1517
$(eval TARGET := $(subst image-,,$@))
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
dependencies:
22
- name: crds
33
repository: ""
4-
version: 0.15.2
4+
version: 0.16.0
55
- name: frr-k8s
66
repository: https://metallb.github.io/frr-k8s
7-
version: 0.0.20
8-
digest: sha256:fcba6d1c8e25efca7a64d2ea30079bfcf041c277605d5881d65d5b3d09a41483
9-
generated: "2025-06-04T12:37:51.709832109+02:00"
7+
version: 0.0.25
8+
digest: sha256:ddb18b3f42ad737784b5417e7e9ade396f68781f4bbca42fcc6012bc55e407a9
9+
generated: "2026-05-20T17:55:28.614632+03:00"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apiVersion: v2
2-
appVersion: v0.15.2
2+
appVersion: v0.16.0
33
dependencies:
44
- condition: crds.enabled
55
name: crds
66
repository: ""
7-
version: 0.15.2
7+
version: 0.16.0
88
- condition: frrk8s.enabled
99
name: frr-k8s
1010
repository: https://metallb.github.io/frr-k8s
11-
version: 0.0.20
11+
version: 0.0.25
1212
description: A network load-balancer implementation for Kubernetes using standard
1313
routing protocols
1414
home: https://metallb.universe.tf
@@ -18,4 +18,4 @@ name: metallb
1818
sources:
1919
- https://github.com/metallb/metallb
2020
type: application
21-
version: 0.15.2
21+
version: 0.16.0

‎packages/system/metallb/charts/metallb/README.md‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Kubernetes: `>= 1.19.0-0`
1717
| Repository | Name | Version |
1818
|------------|------|---------|
1919
| | crds | 0.0.0 |
20-
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.20 |
20+
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.25 |
2121

2222
## Values
2323

@@ -55,20 +55,22 @@ Kubernetes: `>= 1.19.0-0`
5555
| controller.serviceAccount.create | bool | `true` | |
5656
| controller.serviceAccount.name | string | `""` | |
5757
| controller.strategy.type | string | `"RollingUpdate"` | |
58-
| controller.tlsCipherSuites | string | `""` | |
59-
| controller.tlsMinVersion | string | `"VersionTLS12"` | |
6058
| controller.tolerations | list | `[]` | |
59+
| controller.webhookMode | string | `"enabled"` | |
6160
| crds.enabled | bool | `true` | |
6261
| crds.validationFailurePolicy | string | `"Fail"` | |
63-
| frrk8s.enabled | bool | `false` | |
62+
| frr-k8s.prometheus | string | `nil` | |
63+
| frrk8s.enabled | bool | `true` | |
6464
| frrk8s.external | bool | `false` | |
6565
| frrk8s.namespace | string | `""` | |
6666
| fullnameOverride | string | `""` | |
6767
| imagePullSecrets | list | `[]` | |
6868
| loadBalancerClass | string | `""` | |
6969
| nameOverride | string | `""` | |
70-
| prometheus.controllerMetricsTLSSecret | string | `""` | |
71-
| prometheus.metricsPort | int | `7472` | |
70+
| networkpolicies.apiPort | int | `6443` | |
71+
| networkpolicies.defaultDeny | bool | `false` | |
72+
| networkpolicies.enabled | bool | `false` | |
73+
| prometheus.metricsPort | int | `9120` | |
7274
| prometheus.namespace | string | `""` | |
7375
| prometheus.podMonitor.additionalLabels | object | `{}` | |
7476
| prometheus.podMonitor.annotations | object | `{}` | |
@@ -99,9 +101,6 @@ Kubernetes: `>= 1.19.0-0`
99101
| prometheus.prometheusRule.staleConfig.enabled | bool | `true` | |
100102
| prometheus.prometheusRule.staleConfig.labels.severity | string | `"warning"` | |
101103
| prometheus.rbacPrometheus | bool | `true` | |
102-
| prometheus.rbacProxy.pullPolicy | string | `nil` | |
103-
| prometheus.rbacProxy.repository | string | `"gcr.io/kubebuilder/kube-rbac-proxy"` | |
104-
| prometheus.rbacProxy.tag | string | `"v0.12.0"` | |
105104
| prometheus.scrapeAnnotations | bool | `false` | |
106105
| prometheus.serviceAccount | string | `""` | |
107106
| prometheus.serviceMonitor.controller.additionalLabels | object | `{}` | |
@@ -115,23 +114,26 @@ Kubernetes: `>= 1.19.0-0`
115114
| prometheus.serviceMonitor.speaker.additionalLabels | object | `{}` | |
116115
| prometheus.serviceMonitor.speaker.annotations | object | `{}` | |
117116
| prometheus.serviceMonitor.speaker.tlsConfig.insecureSkipVerify | bool | `true` | |
118-
| prometheus.speakerMetricsTLSSecret | string | `""` | |
119117
| rbac.create | bool | `true` | |
120118
| speaker.affinity | object | `{}` | |
119+
| speaker.bgpDebounceTimeout | string | `nil` | BGP debounce timeout for FRR configuration reloads, in milliseconds. Only applies when BGP type is frr. Default (when unset) is 3000 ms. This feature is experimental |
121120
| speaker.enabled | bool | `true` | |
122121
| speaker.excludeInterfaces.enabled | bool | `true` | |
123122
| speaker.extraContainers | list | `[]` | |
124-
| speaker.frr.enabled | bool | `true` | |
123+
| speaker.frr.enabled | bool | `false` | |
125124
| speaker.frr.image.pullPolicy | string | `nil` | |
126125
| speaker.frr.image.repository | string | `"quay.io/frrouting/frr"` | |
127-
| speaker.frr.image.tag | string | `"9.1.0"` | |
128-
| speaker.frr.metricsPort | int | `7473` | |
126+
| speaker.frr.image.tag | string | `"10.5.3"` | |
127+
| speaker.frr.metricsPort | int | `9121` | |
129128
| speaker.frr.resources | object | `{}` | |
130129
| speaker.frrMetrics.resources | object | `{}` | |
131130
| speaker.ignoreExcludeLB | bool | `false` | |
132131
| speaker.image.pullPolicy | string | `nil` | |
133132
| speaker.image.repository | string | `"quay.io/metallb/speaker"` | |
134133
| speaker.image.tag | string | `nil` | |
134+
| speaker.initContainers.cpFrrFiles.resources | object | `{}` | |
135+
| speaker.initContainers.cpMetrics.resources | object | `{}` | |
136+
| speaker.initContainers.cpReloader.resources | object | `{}` | |
135137
| speaker.labels | object | `{}` | |
136138
| speaker.livenessProbe.enabled | bool | `true` | |
137139
| speaker.livenessProbe.failureThreshold | int | `3` | |
@@ -166,6 +168,11 @@ Kubernetes: `>= 1.19.0-0`
166168
| speaker.tolerateMaster | bool | `true` | |
167169
| speaker.tolerations | list | `[]` | |
168170
| speaker.updateStrategy.type | string | `"RollingUpdate"` | |
171+
| tls.cipherSuites | string | `""` | Comma-separated list of TLS cipher suites. If empty, uses Go defaults. Only applies to TLS 1.2. |
172+
| tls.controllerMetricsTLSSecret | string | `""` | The name of the secret to be mounted in the controller pod to provide TLS certificates for metrics endpoints. If not present, a self-signed certificate is auto-generated. |
173+
| tls.curvePreferences | string | `""` | Comma-separated list of numeric CurveID values (e.g. 29,4588). See https://pkg.go.dev/crypto/tls#CurveID. If empty, uses Go defaults. |
174+
| tls.minVersion | string | `""` | Minimum TLS version (VersionTLS12 or VersionTLS13). Defaults to VersionTLS13. |
175+
| tls.speakerMetricsTLSSecret | string | `""` | The name of the secret to be mounted in the speaker pod to provide TLS certificates for metrics endpoints. If not present, a self-signed certificate is auto-generated. |
169176

170177
----------------------------------------------
171178
Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: v2
2-
appVersion: v0.15.2
2+
appVersion: v0.16.0
33
description: MetalLB CRDs
44
home: https://metallb.universe.tf
55
icon: https://metallb.universe.tf/images/logo/metallb-white.png
66
name: crds
77
sources:
88
- https://github.com/metallb/metallb
99
type: application
10-
version: 0.15.2
10+
version: 0.16.0

0 commit comments

Comments
 (0)