Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
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
12 changes: 6 additions & 6 deletions stable/ipfs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
description: A Helm chart for the Interplanetary File System
name: ipfs
version: 0.1.1
version: 0.2.0
icon: https://raw.githubusercontent.com/ipfs/logo/master/raster-generated/ipfs-logo-128-ice-text.png
home: https://ipfs.io/
appVersion: v0.4.9
keywords:
- ipfs
- distributed-web
- ipfs
- distributed-web
sources:
- https://github.com/ipfs/go-ipfs
- https://github.com/ipfs/go-ipfs
maintainers:
- name: YuviPanda
email: [email protected]
- name: YuviPanda
email: [email protected]
10 changes: 5 additions & 5 deletions stable/ipfs/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
You have successfully installed IPFS in your kubernetes cluster!

You can access the IPFS API from inside your cluster by connecting to port 5001 on
{{ template "servicename" . }}.{{ .Release.Namespace }}
{{ template "ipfs.servicename" . }}.{{ .Release.Namespace }}

You can also connect to port 8080 on the same hostname for talking to the IPFS Gateway.

Expand All @@ -10,16 +10,16 @@ If you want to connect to it from your local computer, you can find a URL to con
following (for the gateway service):

{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ipfs.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "servicename" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "servicename" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get svc -w {{ template "ipfs.servicename" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ipfs.servicename" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "Use the API Gateway by accessing http://$SERVICE_IP:8080/ipfs/<IPFS-HASH>"
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ipfs.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Use the API Gateway by accessing http://localhost:8080/ipfs/<IPFS-HASH>"
kubectl --namespace {{ .Release.Namespace}} port-forward $POD_NAME 8080:8080

Expand Down
8 changes: 4 additions & 4 deletions stable/ipfs/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "ipfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- define "ipfs.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand All @@ -22,10 +22,10 @@ We allow overrides for name of service, since this service provides an API that
called by end-users. For example, you could call it 'ipfs' and then all users running in a namespace
could just connect to it by specifying 'ipfs'.
*/}}
{{- define "servicename" -}}
{{- define "ipfs.servicename" -}}
{{- if .Values.service.nameOverride -}}
{{- .Values.service.nameOverride -}}
{{- else -}}
{{- template "fullname" . }}
{{- template "ipfs.fullname" . }}
{{- end -}}
{{- end -}}
6 changes: 3 additions & 3 deletions stable/ipfs/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "servicename" . }}
name: {{ template "ipfs.servicename" . }}
labels:
app: {{ template "name" . }}
app: {{ template "ipfs.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
Expand All @@ -18,5 +18,5 @@ spec:
targetPort: 8080
name: gateway
selector:
app: {{ template "name" . }}
app: {{ template "ipfs.name" . }}
release: {{ .Release.Name }}
8 changes: 4 additions & 4 deletions stable/ipfs/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "fullname" . }}
name: {{ template "ipfs.fullname" . }}
labels:
app: {{ template "name" . }}
app: {{ template "ipfs.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
serviceName: {{ template "servicename" . }}
serviceName: {{ template "ipfs.servicename" . }}
template:
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "ipfs.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
Expand Down