Skip to content

Commit 9020acf

Browse files
feat(request-ipfs): allow setting externalIP (#38)
1 parent 3fca783 commit 9020acf

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

charts/request-ipfs/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: v0.4.23
33
description: A Helm chart for a dedicated Request IPFS node
44
name: request-ipfs
5-
version: 0.7.0
5+
version: 0.8.0
66
keywords:
77
- request
88
- ipfs

charts/request-ipfs/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,20 @@ $ helm install --name my-release request/request-ipfs
2828

2929
The following table lists the configurable parameters of the Request IPFS chart and their default values.
3030

31-
| Parameter | Description | Default |
32-
|------------------------|--------------------------------------------------------------------------------------------------|-------------------------------|
33-
| `replicaCount` | The amount of replicas to run | `1` |
34-
| `image.image` | The docker image for the dedicated IPFS node | `requestnetwork/request-ipfs` |
35-
| `image.tag` | The version tag for the dedicated IPFS node image | `v0.4.23` |
36-
| `image.pullPolicy` | Dedicated IPFS node image pull policy | `Always` |
37-
| `swarm.loadBalancerIP` | Static IP address used by the load balancer (optional) | `null` |
38-
| `swarm.externalIP` | Swarm address to announce to the network. Usually same as `ipfs.swarm.loadBalancerIP` (optional) | `null` |
39-
| `identity.peerId` | The IPFS node PeerID (optional) | `null` |
40-
| `identity.privateKey` | The IPFS node Private Key (optional) | `null` |
41-
| `extraEnvs` | Additional environment variables to pass down to the IPFS node (optional) | `{}` |
31+
| Parameter | Description | Default |
32+
|--------------------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------|
33+
| `replicaCount` | The amount of replicas to run | `1` |
34+
| `image.image` | The docker image for the dedicated IPFS node | `requestnetwork/request-ipfs` |
35+
| `image.tag` | The version tag for the dedicated IPFS node image | `v0.4.23` |
36+
| `image.pullPolicy` | Dedicated IPFS node image pull policy | `Always` |
37+
| `swarm.port` | Port to access the IPFS swarm | `4001` |
38+
| `swarm.externalIP` | Swarm address to announce to the network (optional). Usually should be the same as `swarm.service.loadBalancerIP` | `null` |
39+
| `swarm.service.enabled` | Whether to enable the load service to access to IPFS swarm | `true` |
40+
| `swarm.service.type` | The service type to access the IPFS swarm | `LoadBalancer` |
41+
| `swarm.service.loadBalancerIP` | Static IP address used by the load balancer (optional) | `null` |
42+
| `identity.peerId` | The IPFS node PeerID (optional) | `null` |
43+
| `identity.privateKey` | The IPFS node Private Key (optional) | `null` |
44+
| `extraEnvs` | Additional environment variables to pass down to the IPFS node (optional) | `{}` |
4245

4346
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
4447

charts/request-ipfs/templates/ipfs-swarm-load-balancer.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{- if .Values.swarm.service.enabled -}}
2+
13
# Load balancer to expose the IPFS node swarm port
24
apiVersion: v1
35
kind: Service
@@ -11,8 +13,10 @@ spec:
1113
port: {{ .Values.swarm.port }}
1214
protocol: TCP
1315
targetPort: 4001
14-
loadBalancerIP: {{ .Values.swarm.loadBalancerIP }}
16+
loadBalancerIP: {{ .Values.swarm.service.loadBalancerIP }}
1517
selector:
1618
{{ include "request-ipfs.labels" . | indent 4 }}
1719
sessionAffinity: None
18-
type: LoadBalancer
20+
type: {{ .Values.swarm.service.type }}
21+
22+
{{- end -}}

charts/request-ipfs/templates/statefulSet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ spec:
5454
# Forces the IPFS node to connect to the Request dedicated network
5555
- name: LIBP2P_FORCE_PNET
5656
value: "1"
57+
{{- if .Values.swarm.externalIP }}
58+
- name: EXTERNAL_IP
59+
value: {{ .Values.swarm.externalIP }}
60+
{{- end }}
5761
{{- if .Values.swarm.port }}
5862
- name: SWARM_PORT
5963
value: {{ .Values.swarm.port | quote }}

charts/request-ipfs/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ image:
2121
# IPFS swarm port
2222
swarm:
2323
port: 4001
24-
loadBalancerIP:
24+
externalIP:
25+
service:
26+
enabled: true
27+
type: LoadBalancer
28+
loadBalancerIP:
2529
# IPFS API port
2630
api:
2731
port: 5001

0 commit comments

Comments
 (0)