From a58052ab505b520449c350bf4a2175bfd865c16c Mon Sep 17 00:00:00 2001 From: darkobas Date: Thu, 13 Nov 2025 23:27:12 +0100 Subject: [PATCH 1/2] feat: add p2pwss port to bee pod --- charts/bee/README.md | 2 +- charts/bee/templates/NOTES.txt | 2 +- charts/bee/templates/_helpers.tpl | 5 +++++ charts/bee/templates/service-headless.yaml | 8 ++++++-- charts/bee/templates/service-p2p.yaml | 7 +++++++ charts/bee/templates/statefulset.yaml | 3 +++ charts/bee/values.yaml | 4 +++- 7 files changed, 26 insertions(+), 5 deletions(-) diff --git a/charts/bee/README.md b/charts/bee/README.md index 33f7b31..bc8ac62 100644 --- a/charts/bee/README.md +++ b/charts/bee/README.md @@ -23,7 +23,7 @@ $ helm install --generate-name ethersphere/bee ## Introduction -This chart deploys a [Ethereum Swarm Bee](https://github.com/ethersphere/bee) onto a Kubernetes cluster using the Helm package manager. It creates ConfigMap, Deployment and Service Kubernetes objects, while Ingress and ServiceAccount are optional. +This chart bootstraps a Bee node. It creates ConfigMap, Deployment and Service Kubernetes objects, while Ingress and ServiceAccount are optional. ## Prerequisites diff --git a/charts/bee/templates/NOTES.txt b/charts/bee/templates/NOTES.txt index 23b8e44..88721c0 100644 --- a/charts/bee/templates/NOTES.txt +++ b/charts/bee/templates/NOTES.txt @@ -1,4 +1,4 @@ -1. Get the application URL by running these commands: +1. Get the Bee address: {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} {{- range .paths }} diff --git a/charts/bee/templates/_helpers.tpl b/charts/bee/templates/_helpers.tpl index b1f7373..cc5111b 100644 --- a/charts/bee/templates/_helpers.tpl +++ b/charts/bee/templates/_helpers.tpl @@ -137,6 +137,11 @@ Define config parameters api-addr, p2p-addr {{- $p2p_port := (split ":" $full_p2p_addr )._1 }} {{- printf "%s" $p2p_port -}} {{- end -}} +{{- define "bee.config.p2p-wss_port" -}} +{{- $full_p2p_wss_addr := index .Values.beeConfig "p2p-wss-port" -}} +{{- $p2p_wss_port := (split ":" $full_p2p_wss_addr )._1 }} +{{- printf "%s" $p2p_wss_port -}} +{{- end -}} {{/* diff --git a/charts/bee/templates/service-headless.yaml b/charts/bee/templates/service-headless.yaml index 7617b0c..9386cfa 100644 --- a/charts/bee/templates/service-headless.yaml +++ b/charts/bee/templates/service-headless.yaml @@ -16,11 +16,15 @@ spec: - name: p2p-udp port: {{ int (include "bee.config.p2p_port" .) }} protocol: UDP - targetPort: p2p + targetPort: p2p-udp - name: p2p-tcp port: {{ int (include "bee.config.p2p_port" .) }} protocol: TCP - targetPort: p2p + targetPort: p2p-tcp + - name: p2p-wss + port: {{ int (include "bee.config.p2p-wss_port" .) }} + protocol: TCP + targetPort: p2p-wss selector: {{- include "bee.selectorLabels" . | nindent 4 }} type: {{ .Values.service.type }} diff --git a/charts/bee/templates/service-p2p.yaml b/charts/bee/templates/service-p2p.yaml index d735a8c..a2ccba4 100644 --- a/charts/bee/templates/service-p2p.yaml +++ b/charts/bee/templates/service-p2p.yaml @@ -30,6 +30,13 @@ spec: {{- if $root.Values.p2pFixedPort.enabled }} nodePort: {{ add $root.Values.p2pFixedPort.nodePortStart $i }} {{- end }} + - name: p2p-wss + port: {{ int (include "bee.config.p2p-wss_port" $root) }} + protocol: TCP + targetPort: p2p-wss + {{- if $root.Values.p2pWssFixedPort.enabled }} + nodePort: {{ add $root.Values.p2pWssFixedPort.nodePortStart $i }} + {{- end }} selector: {{- include "bee.selectorLabels" $root | nindent 4 }} statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} diff --git a/charts/bee/templates/statefulset.yaml b/charts/bee/templates/statefulset.yaml index ef1a343..bad63eb 100644 --- a/charts/bee/templates/statefulset.yaml +++ b/charts/bee/templates/statefulset.yaml @@ -197,6 +197,9 @@ spec: - containerPort: {{ int (include "bee.config.p2p_port" .) }} name: p2p-udp protocol: UDP + - containerPort: {{ int (include "bee.config.p2p-wss_port" .) }} + name: p2p-wss + protocol: TCP {{- if .Values.probesEnable }} livenessProbe: httpGet: diff --git a/charts/bee/values.yaml b/charts/bee/values.yaml index a9a39db..1f9b16b 100644 --- a/charts/bee/values.yaml +++ b/charts/bee/values.yaml @@ -193,12 +193,13 @@ beeConfig: api-addr: :1633 ## P2P listen address p2p-addr: :1634 + ## P2P WSS listen address + p2p-wss-port: :1635 ## Set the run mode - light by default full-node: true ## ID of the Swarm network - 10 by default network-id: 1 autotls-enabled: true - p2p-wss-port: "1635" ## If enabled, for NodePort (p2p-wss service) ## the Kubernetes control plane will allocate a port from a range (default: 30000-32767) @@ -211,6 +212,7 @@ p2pWssFixedPort: nodePortStart: 31001 publicIpUrl: http://ifconfig.me/ip + ## Password for decrypting bee keys (please set it for production deployments) ## If not set, it will be automatically generated password: From 630f2005ddcd14cb41b2d07b6a1f6719fb565c26 Mon Sep 17 00:00:00 2001 From: darkobas Date: Thu, 13 Nov 2025 23:27:45 +0100 Subject: [PATCH 2/2] chore: bump chart version to 0.16.11 --- charts/bee/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/bee/Chart.yaml b/charts/bee/Chart.yaml index 32a463d..9218372 100644 --- a/charts/bee/Chart.yaml +++ b/charts/bee/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: 2.5.0 name: bee -version: 0.16.10 +version: 0.16.11 kubeVersion: ">=1.19.0-0" description: Ethereum Swarm Bee Helm chart for Kubernetes home: https://www.ethswarm.org