Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/bee/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: 2.5.0
name: bee
version: 0.16.9
version: 0.16.10
kubeVersion: ">=1.19.0-0"
description: Ethereum Swarm Bee Helm chart for Kubernetes
home: https://www.ethswarm.org
Expand Down
15 changes: 11 additions & 4 deletions charts/bee/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
- name: bee-swarm
mountPath: /tmp/bee
{{- end }}
{{- if .Values.p2pFixedPort.enabled }}
{{- if or .Values.p2pFixedPort.enabled .Values.p2pWssFixedPort.enabled }}
- name: init-natport
image: ethersphere/busybox:1.36
securityContext:
Expand All @@ -107,11 +107,18 @@ spec:
- sh
- -c
- >
PUBLIC_IP=$(wget -T 2 {{ .Values.p2pFixedPort.publicIpUrl }} -q -O -);
if ! [ -f /home/bee/.bee.yaml ]; then cp -p /tmp/.bee.yaml /home/bee/.bee.yaml; fi;
export INDEX=$(echo $(hostname) | rev | cut -d'-' -f 1 | rev);
{{- if .Values.p2pFixedPort.enabled }}
PUBLIC_IP=$(wget -T 10 {{ .Values.p2pFixedPort.publicIpUrl }} -q -O -);
NAT_PORT=$(( {{ .Values.p2pFixedPort.nodePortStart }} + INDEX ));
cp -p /tmp/.bee.yaml /home/bee/.bee.yaml;
printf 'nat-addr: %s:%s\n' "${PUBLIC_IP}" "${NAT_PORT}" >> /home/bee/.bee.yaml;
{{- end }}
{{- if .Values.p2pWssFixedPort.enabled }}
PUBLIC_IP=$(wget -T 10 {{ .Values.p2pWssFixedPort.publicIpUrl }} -q -O -);
NAT_PORT=$(( {{ .Values.p2pWssFixedPort.nodePortStart }} + INDEX ));
printf 'nat-wss-addr: %s:%s\n' "${PUBLIC_IP}" "${NAT_PORT}" >> /home/bee/.bee.yaml;
{{- end }}
echo 'node initialization done';
volumeMounts:
- name: config-file
Expand Down Expand Up @@ -207,7 +214,7 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
{{- if or .Values.p2pFixedPort.enabled .Values.autoNeighborhood.enabled }}
{{- if or .Values.p2pFixedPort.enabled .Values.p2pWssFixedPort.enabled .Values.autoNeighborhood.enabled }}
- name: config-file
mountPath: /home/bee
{{- else }}
Expand Down
13 changes: 13 additions & 0 deletions charts/bee/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,19 @@ beeConfig:
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)
## You can enable and specify start value and NodePort will be $nodePortStart + $ordinal
## If wanted port if used by some other service deploy will fail
## By default AWS internal endpoint will be used to discover public IP
## You can specify public services as icanhazip.com etc.
p2pWssFixedPort:
enabled: false
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
Expand Down