Skip to content

Commit

Permalink
Merge pull request #184 from ethersphere/improve-charts
Browse files Browse the repository at this point in the history
  • Loading branch information
vandot authored May 27, 2022
2 parents 883a50a + 8b66514 commit 22e03a9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 28 deletions.
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: 1.6.0
name: bee
version: 0.12.1
version: 0.12.2
kubeVersion: ">=1.19.0-0"
description: Ethereum Swarm Bee Helm chart for Kubernetes
home: https://www.ethswarm.org
Expand Down
9 changes: 3 additions & 6 deletions charts/bee/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ spec:
- sh
- -c
- >
export INDEX=$(echo $(hostname) | cut -d'-' -f2-);
mkdir -p /home/bee/.bee/keys;
chown -R 999:999 /home/bee/.bee/keys;
export KEY=$(cat /tmp/bee/libp2p.map | grep bee-${INDEX}: | cut -d' ' -f2);
export KEY=$(cat /tmp/bee/libp2p.map | grep $(hostname): | cut -d' ' -f2);
if [ -z "${KEY}" ]; then exit 0; fi;
printf '%s' "${KEY}" > /home/bee/.bee/keys/libp2p.key;
echo 'node initialization done';
Expand All @@ -80,10 +79,9 @@ spec:
- sh
- -c
- >
export INDEX=$(echo $(hostname) | cut -d'-' -f2-);
mkdir -p /home/bee/.bee/keys;
chown -R 999:999 /home/bee/.bee/keys;
export KEY=$(cat /tmp/bee/swarm.map | grep bee-${INDEX}: | cut -d' ' -f2);
export KEY=$(cat /tmp/bee/swarm.map | grep $(hostname): | cut -d' ' -f2);
if [ -z "${KEY}" ]; then exit 0; fi;
printf '%s' "${KEY}" > /home/bee/.bee/keys/swarm.key;
echo 'node initialization done';
Expand All @@ -100,10 +98,9 @@ spec:
- sh
- -c
- >
export INDEX=$(echo $(hostname) | cut -d'-' -f2-);
mkdir -p /app/data/keystore;
chown -R nobody:nogroup /app/data/keystore;
export KEY=$(cat /tmp/bee/clef.map | grep bee-${INDEX}: | cut -d' ' -f2);
export KEY=$(cat /tmp/bee/clef.map | grep $(hostname): | cut -d' ' -f2);
if [ -n "${KEY}" ]; then printf '%s' "${KEY}" > /app/data/keystore/clef.key; fi;
/entrypoint.sh init;
echo 'clef initialization done';
Expand Down
2 changes: 1 addition & 1 deletion charts/geth-swap/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.3.4
version: 0.3.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
2 changes: 2 additions & 0 deletions charts/geth-swap/templates/setupcontracts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.gethSetup -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -34,3 +35,4 @@ spec:
sleep 2;
bash deploy.sh
restartPolicy: Never
{{- end -}}
25 changes: 5 additions & 20 deletions charts/geth-swap/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,38 +67,23 @@ spec:
image: "{{ include "geth-swap.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- geth
- --http
- --http.addr
- "0.0.0.0"
- --allow-insecure-unlock
- --http.api
- 'eth,net,personal,web3'
- --http.vhosts
- "*"
- --ws
- --ws.addr
- "0.0.0.0"
- --ws.api
- 'eth,net,personal,web3'
- --unlock={{ .Values.geth.genesis.validatorAddress }}
- --password=/dev/null
- --mine
- --lightkdf
- --syncmode=full
- --cache={{ .Values.geth.cache }}
{{- range .Values.gethCommand }}
- {{ . }}
{{- end }}
ports:
- name: rpc
containerPort: 8545
protocol: TCP
- name: ws
containerPort: 8546
protocol: TCP
{{- if .Values.probesEnable }}
livenessProbe:
httpGet:
path: /
port: rpc
initialDelaySeconds: 5
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
Expand Down
3 changes: 3 additions & 0 deletions charts/geth-swap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ imageSetupContract:
pullPolicy: Always

gethSetup: true
probesEnable: true

geth:
cache: 512
Expand All @@ -33,6 +34,8 @@ geth:
- addr: "62cab2b3b55f341f10348720ca18063cdb779ad5"
wei: "0xf0000000000000000000000000"

gethCommand: ["geth", "--http", "--http.addr", "'0.0.0.0'", "--allow-insecure-unlock", "--http.api", "'eth,net,personal,web3'", "--http.vhosts", "'*'", "--ws", "--ws.addr", "'0.0.0.0'", "--ws.api", "'eth,net,personal,web3'", "--unlock=62cab2b3b55f341f10348720ca18063cdb779ad5", "--password=/dev/null", "--mine", "--lightkdf", "--syncmode=full", "--cache=512"]

swap:
gas: "2000000"
bzzaccounts:
Expand Down

0 comments on commit 22e03a9

Please sign in to comment.