Skip to content

Commit

Permalink
Merge pull request #2 from w3f/persistence
Browse files Browse the repository at this point in the history
enabled persistence, fixed networking, changed gateway domain, added …
  • Loading branch information
ironoa authored Nov 25, 2021
2 parents f75ce56 + b1e0897 commit bcf9b11
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@
# ipfs-cluster-chart
Helm Chart for: https://cluster.ipfs.io/documentation/guides/k8s/

NOTE: all the secrets are hardcoded and will be replaced
NOTE: all the secrets are hardcoded and will be replaced

## NOTE

The chart is inspired from:
- https://github.com/ipfs/ipfs-cluster-website/blob/1258134676f5293422eb97b702ae56b207261e62/content/documentation/guides/k8s.md
- https://cluster.ipfs.io/documentation/guides/k8s/
2 changes: 1 addition & 1 deletion charts/ipfs-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: IPFS Cluster chart
name: ipfs-cluster
version: v0.0.2
version: v0.0.3
apiVersion: v2
10 changes: 2 additions & 8 deletions charts/ipfs-cluster/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/limit-rps: "10"
cert-manager.io/cluster-issuer: letsencrypt
Expand All @@ -22,11 +23,4 @@ spec:
service:
name: {{ include "ipfs-cluster.serviceNameHttp" . }}
port:
name: api
- path: /gateway/(.+)
pathType: Prefix
backend:
service:
name: {{ include "ipfs-cluster.serviceNameHttp" . }}
port:
name: gateway
name: gateway
1 change: 0 additions & 1 deletion charts/ipfs-cluster/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
node: {{ .Release.Name }}
spec:
type: LoadBalancer
externalTrafficPolicy: Local
ports:
- name: swarm
targetPort: swarm
Expand Down
12 changes: 6 additions & 6 deletions charts/ipfs-cluster/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ spec:
- name: CLUSTER_RESTAPI_PRIVATEKEY
value: "CAESQEmvGJbMboEibpcWCTKOtDYU2eEyyHLN9gDdJli6Z2tksAkhFWNx0Fk3vOlwLIitE2rfGtIj61Ovla/mHC42Plg="
- name: CLUSTER_RESTAPI_BASICAUTHCREDENTIALS
value: "w3f:password"
value: "w3f:password"
- name: CLUSTER_CRDT_TRUSTEDPEERS
value: "QmfBjL2kDjr34JbTLquxJE7d8gNbMuRmLbDuyHPQcebSgV,12D3KooWMQy63QTigMxb4sX3jva4P52PbdnAaatVjZZta63TDnL3"
- name: SVC_NAME
value: {{ include "ipfs-cluster.serviceName" . }}
ports:
Expand Down Expand Up @@ -128,7 +130,7 @@ spec:
- name: configure-script
configMap:
name: {{ include "ipfs-cluster.configmapBootstrapName" . }}
{{ if ne .Values.persistance.enabled true }}
{{ if ne .Values.persistence.enabled true }}
- name: cluster-storage
emptyDir: {}
- name: ipfs-storage
Expand All @@ -138,17 +140,15 @@ spec:
- metadata:
name: cluster-storage
spec:
storageClassName: standard
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.persistance.clusterStorage }}
storage: {{ .Values.persistence.clusterStorage }}
- metadata:
name: ipfs-storage
spec:
storageClassName: standard
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.persistance.ipfsStorage }}
storage: {{ .Values.persistence.ipfsStorage }}
{{ end }}
4 changes: 2 additions & 2 deletions charts/ipfs-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ bootstrapPeerId: QmfBjL2kDjr34JbTLquxJE7d8gNbMuRmLbDuyHPQcebSgV
replicaCount: 1

domain: ipfs.w3f.community
httpDomain: ipfs-http.w3f.community
httpDomain: ipfs-gateway.w3f.community

persistance:
persistence:
enabled: true
clusterStorage: 5Gi
ipfsStorage: 200Gi
2 changes: 1 addition & 1 deletion helmfile.d/10-ipfs-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ releases:
{{ if eq .Environment.Name "production" }}
chart: w3f/ipfs-cluster
namespace: ipfs
version: v0.0.2
version: v0.0.3
{{ else }}
chart: ../charts/ipfs-cluster
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions helmfile.d/config/ipfs-cluster-values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image:
tag: {{ env "CIRCLE_SHA1" | default "kind" }}
{{ end }}

persistance:
enabled: false
persistence:
enabled: true

replicaCount: 2

0 comments on commit bcf9b11

Please sign in to comment.