diff --git a/charts/ipfs/1.1.0/.helmignore b/charts/ipfs/1.1.0/.helmignore new file mode 100644 index 0000000000..a9fe727881 --- /dev/null +++ b/charts/ipfs/1.1.0/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# OWNERS file for Kubernetes +OWNERS \ No newline at end of file diff --git a/charts/ipfs/1.1.0/Chart.yaml b/charts/ipfs/1.1.0/Chart.yaml new file mode 100644 index 0000000000..e0336e6aed --- /dev/null +++ b/charts/ipfs/1.1.0/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +description: Global, Versioned, peer-to-peer filesystem. +name: ipfs +version: 1.1.0 +appVersion: v0.8.0 +keywords: +- storage +- p2p +home: https://ipfs.io +icon: https://ipfs.io/ipfs/QmVk7srrwahXLNmcDYvyUEJptyoxpndnRa57YJ11L4jV26/ipfs.go.png +sources: +- https://github.com/ipfs/go-ipfs +- https://hub.docker.com/r/ipfs/go-ipfs +upstream_version: 0.8.0-rc1 +dependencies: + - name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 diff --git a/charts/ipfs/1.1.0/README.md b/charts/ipfs/1.1.0/README.md new file mode 100755 index 0000000000..d6bdd49a12 --- /dev/null +++ b/charts/ipfs/1.1.0/README.md @@ -0,0 +1,22 @@ +IPFS +===== + +[IPFS](https://ipfs.io) is a global, versioned, peer-to-peer filesystem. It combines good ideas from previous systems such Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bittorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built in. You can also mount the world at /ipfs. + +Introduction +------------ + +This chart bootstraps IPFS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + + +Configuration +------------- + +The following table lists the configurable parameters of the IPFS chart and their default values. + +| Parameter | Description | Default | +|:-------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------| +| `image.repository` | Image repository | `ipfs/go-ipfs` | +| `image.tag` | IPFS image tag. Possible values listed [here](https://hub.docker.com/r/ipfs/go-ipfs/tags). | `v0.8.0-rc1` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `extraArgs` | Additional command line arguments to pass to the IPFS server | `[]` | diff --git a/charts/ipfs/1.1.0/app-readme.md b/charts/ipfs/1.1.0/app-readme.md new file mode 100644 index 0000000000..dc481d47c8 --- /dev/null +++ b/charts/ipfs/1.1.0/app-readme.md @@ -0,0 +1 @@ +[IPFS](https://ipfs.io) is a global, versioned, peer-to-peer filesystem. It combines good ideas from previous systems such Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bittorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built in. You can also mount the world at /ipfs. diff --git a/charts/ipfs/1.1.0/charts/common-2105.0.0.tgz b/charts/ipfs/1.1.0/charts/common-2105.0.0.tgz new file mode 100644 index 0000000000..6a406ffcec Binary files /dev/null and b/charts/ipfs/1.1.0/charts/common-2105.0.0.tgz differ diff --git a/charts/ipfs/1.1.0/default_values.yaml b/charts/ipfs/1.1.0/default_values.yaml new file mode 100644 index 0000000000..407c7a3732 --- /dev/null +++ b/charts/ipfs/1.1.0/default_values.yaml @@ -0,0 +1,27 @@ +## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the +## +image: + repository: ipfs/go-ipfs + tag: v0.8.0-rc1 + pullPolicy: IfNotPresent + +## Additional arguments to pass to ipfs binary +extraArgs: [] + +updateStrategy: Recreate + +service: + swarmPort: 9401 + apiPort: 9501 + gatewayPort: 9080 + +environment: + +appVolumeMounts: + staging: + emptyDir: true + mountPath: "/export" + data: + emptyDir: true + mountPath: "/data/ipfs" + diff --git a/charts/ipfs/1.1.0/ix_values.yaml b/charts/ipfs/1.1.0/ix_values.yaml new file mode 100644 index 0000000000..a41f18a171 --- /dev/null +++ b/charts/ipfs/1.1.0/ix_values.yaml @@ -0,0 +1,4 @@ +image: + repository: ipfs/go-ipfs + tag: v0.8.0 + pullPolicy: IfNotPresent diff --git a/charts/ipfs/1.1.0/questions.yaml b/charts/ipfs/1.1.0/questions.yaml new file mode 100644 index 0000000000..232ff66070 --- /dev/null +++ b/charts/ipfs/1.1.0/questions.yaml @@ -0,0 +1,193 @@ +groups: + - name: "Container Images" + description: "Image to be used for container" + - name: "Workload Configuration" + description: "Configure Storage for IPFS" + - name: "Storage" + description: "Configure Storage for IPFS" + - name: "IPFS Configuration" + description: "Configure Storage for IPFS" + - name: "Advanced DNS Settings" + description: "Configure DNS settings" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-service.apiPort" + path: "/webui" + +questions: + + - variable: dnsConfig + label: "DNS Configuration" + group: "Advanced DNS Settings" + schema: + type: dict + attrs: + - variable: options + label: "DNS Options" + schema: + type: list + items: + - variable: optionsEntry + label: "Option Entry Configuration" + schema: + type: dict + attrs: + - variable: name + label: "Option Name" + schema: + type: string + required: true + - variable: value + label: "Option Value" + schema: + type: string + required: true + + - variable: updateStrategy + label: "IPFS update strategy" + group: "Workload Configuration" + schema: + type: string + default: "Recreate" + enum: + - value: "RollingUpdate" + description: "Create new pods and then kill old ones" + - value: "Recreate" + description: "Kill existing pods before creating new ones" + + - variable: environmentVariables + label: "IPFS image environment" + group: "IPFS Configuration" + schema: + type: list + default: [] + items: + - variable: environmentVariable + label: "Environment Variable" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string + + - variable: service + description: "IPFS Service Configuration" + label: "IPFS Service Configuration" + group: "IPFS Configuration" + schema: + type: dict + required: true + attrs: + - variable: swarmPort + label: "Swarm Port to use for IPFS (Public)" + schema: + type: int + min: 9000 + max: 65535 + default: 9401 + required: true + - variable: apiPort + label: "API Port to use for IPFS (local)" + schema: + type: int + min: 9000 + max: 65535 + default: 9501 + required: true + - variable: gatewayPort + label: "Gateway Port to use for IPFS (local)" + schema: + type: int + min: 9000 + max: 65535 + default: 9880 + required: true + + - variable: appVolumeMounts + label: "IPFS Storage" + group: "Storage" + schema: + type: dict + attrs: + - variable: staging + label: "Staging Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "IPFS Staging Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-ipfs-staging" + editable: false + - variable: mountPath + label: "IPFS Staging Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/export" + - variable: hostPathEnabled + label: "Enable Host Path for IPFS Staging Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for IPFS Staging Volume" + schema: + type: hostpath + required: true + - variable: data + label: "Data Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "IPFS Data Volume Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-ipfs-data" + editable: false + - variable: mountPath + label: "IPFS Data Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/data/ipfs" + - variable: hostPathEnabled + label: "Enable Host Path for IPFS Data Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for IPFS Data Volume" + schema: + type: hostpath + required: true diff --git a/charts/ipfs/1.1.0/requirements.lock b/charts/ipfs/1.1.0/requirements.lock new file mode 100644 index 0000000000..9af05d743a --- /dev/null +++ b/charts/ipfs/1.1.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 +digest: sha256:11522ab36487826700d7ad0f86f713a4bb5d35248014bcef690fe94acbc09ef6 +generated: "2021-05-10T13:07:35.352903+05:00" diff --git a/charts/ipfs/1.1.0/templates/NOTES.txt b/charts/ipfs/1.1.0/templates/NOTES.txt new file mode 100644 index 0000000000..cb1d892a3b --- /dev/null +++ b/charts/ipfs/1.1.0/templates/NOTES.txt @@ -0,0 +1,2 @@ +IPFS can be accessed from the following URL: +http://$node_ip:{{ .Values.service.apiPort }}/webui diff --git a/charts/ipfs/1.1.0/templates/deployment.yaml b/charts/ipfs/1.1.0/templates/deployment.yaml new file mode 100644 index 0000000000..822817e453 --- /dev/null +++ b/charts/ipfs/1.1.0/templates/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels" . | nindent 4 }} +spec: + strategy: + type: {{ .Values.updateStrategy }} + selector: + matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }} + template: + metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels.selectorLabels" . | nindent 8 }} + spec: + serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }} + initContainers: + - name: init-init + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/bin/sh', '-c', '[ ! -e /data/ipfs/config ] && (/usr/local/bin/ipfs init ; chown -R 1000:100 /data/ipfs) ; exit 0'] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-api + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/usr/local/bin/ipfs', 'config', 'Addresses.API', "/ip4/0.0.0.0/tcp/9501"] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-gateway + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/usr/local/bin/ipfs', 'config', 'Addresses.Gateway', "/ip4/0.0.0.0/tcp/9080"] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-swarm + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/usr/local/bin/ipfs', 'config', '--json', 'Addresses.Swarm', "[\"/ip4/0.0.0.0/tcp/9401\",\"/ip4/0.0.0.0/tcp/9401/quic\"]" ] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-access-origin + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Origin', "[\"*\"]" ] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-access-methods + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['/usr/local/bin/ipfs', 'config', '--json', 'API.HTTPHeaders.Access-Control-Allow-Methods', "[\"PUT\",\"POST\"]" ] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + - name: init-chown + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: ['chown', '1000:100', '/data/ipfs/config'] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + containers: + - name: {{ .Chart.Name }} + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + ports: + - name: swarm + containerPort: 9401 + - name: api + containerPort: 9501 + - name: gateway + containerPort: 9880 +{{ include "common.containers.allEnvironmentVariables" .Values | nindent 10 }} +{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} +{{ include "common.storage.allAppVolumes" .Values | nindent 6 }} diff --git a/charts/ipfs/1.1.0/templates/service.yaml b/charts/ipfs/1.1.0/templates/service.yaml new file mode 100644 index 0000000000..4cc9718639 --- /dev/null +++ b/charts/ipfs/1.1.0/templates/service.yaml @@ -0,0 +1,8 @@ +{{ $svc := .Values.service }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "swarm" "port" $svc.swarmPort "nodePort" $svc.swarmPort "targetPort" 9401) }} +{{ $ports = mustAppend $ports (dict "name" "api" "port" $svc.apiPort "nodePort" $svc.apiPort "targetPort" 9501) }} +{{ $ports = mustAppend $ports (dict "name" "gateway" "port" $svc.gatewayPort "nodePort" $svc.gatewayPort "targetPort" 9880) }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }} +{{ include "common.classes.service" $params }} diff --git a/charts/ipfs/1.1.0/templates/serviceaccount.yaml b/charts/ipfs/1.1.0/templates/serviceaccount.yaml new file mode 100644 index 0000000000..12bd3f4a39 --- /dev/null +++ b/charts/ipfs/1.1.0/templates/serviceaccount.yaml @@ -0,0 +1 @@ +{{ include "common.serviceaccount" . }} diff --git a/charts/ipfs/1.1.0/test_values.yaml b/charts/ipfs/1.1.0/test_values.yaml new file mode 100644 index 0000000000..9b6d8652f3 --- /dev/null +++ b/charts/ipfs/1.1.0/test_values.yaml @@ -0,0 +1,30 @@ +## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the +## +image: + repository: ipfs/go-ipfs + tag: v0.8.0 + pullPolicy: IfNotPresent + +## Additional arguments to pass to minio binary +extraArgs: [] + +updateStrategy: Recreate + +service: + swarmPort: 30941 + apiPort: 30951 + gatewayPort: 30980 + +environmentVariables: [] + +emptyDirVolumes: true +appVolumeMounts: + staging: + emptyDir: true + mountPath: "/export" + data: + emptyDir: true + mountPath: "/data/ipfs" + +dnsConfig: + options: [] diff --git a/charts/ipfs/1.1.0/values.yaml b/charts/ipfs/1.1.0/values.yaml new file mode 100644 index 0000000000..e69de29bb2