diff --git a/charts/chia/1.0.0/.helmignore b/charts/chia/1.0.0/.helmignore new file mode 100644 index 0000000000..a9fe727881 --- /dev/null +++ b/charts/chia/1.0.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/chia/1.0.0/Chart.yaml b/charts/chia/1.0.0/Chart.yaml new file mode 100644 index 0000000000..ad2b94a969 --- /dev/null +++ b/charts/chia/1.0.0/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +description: Global, Versioned, peer-to-peer filesystem. +name: chia +version: 1.0.0 +appVersion: 1.1.4 +keywords: +- storage +- crypto +- blockchain +home: https://www.chia.net/ +icon: https://www.chia.net/img/chia_logo.svg +sources: +- https://github.com/Chia-Network/chia-blockchain +- https://github.com/orgs/chia-network/packages/container/package/chia +dependencies: + - name: common + repository: file://../../../library/common/2104.0.0 + version: 2104.0.0 diff --git a/charts/chia/1.0.0/README.md b/charts/chia/1.0.0/README.md new file mode 100755 index 0000000000..53fa46dae8 --- /dev/null +++ b/charts/chia/1.0.0/README.md @@ -0,0 +1,9 @@ +Chia Network +===== + +[CHIA](https://www.chia.net/) is a new blockchain and smart transaction platform that is easier to use, more efficient, and secure. +Introduction +------------ + +This chart bootstraps CHIA deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +[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/chia/1.0.0/app-readme.md b/charts/chia/1.0.0/app-readme.md new file mode 100644 index 0000000000..6ab946dd9e --- /dev/null +++ b/charts/chia/1.0.0/app-readme.md @@ -0,0 +1,4 @@ +Chia Network +===== + +[CHIA](https://www.chia.net/) is a new blockchain and smart transaction platform that is easier to use, more efficient, and secure. diff --git a/charts/chia/1.0.0/charts/common-2104.0.0.tgz b/charts/chia/1.0.0/charts/common-2104.0.0.tgz new file mode 100644 index 0000000000..83d4f734c9 Binary files /dev/null and b/charts/chia/1.0.0/charts/common-2104.0.0.tgz differ diff --git a/charts/chia/1.0.0/default_values.yaml b/charts/chia/1.0.0/default_values.yaml new file mode 100644 index 0000000000..407c7a3732 --- /dev/null +++ b/charts/chia/1.0.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/chia/1.0.0/ix_values.yaml b/charts/chia/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..c5a8ef54d4 --- /dev/null +++ b/charts/chia/1.0.0/ix_values.yaml @@ -0,0 +1,4 @@ +image: + repository: ghcr.io/chia-network/chia + tag: 1.1.4 + pullPolicy: IfNotPresent diff --git a/charts/chia/1.0.0/questions.yaml b/charts/chia/1.0.0/questions.yaml new file mode 100644 index 0000000000..358363c5d0 --- /dev/null +++ b/charts/chia/1.0.0/questions.yaml @@ -0,0 +1,161 @@ +groups: + - name: "Workload Configuration" + description: "Configure Storage for IPFS" + - name: "Storage" + description: "Configure Storage for IPFS" + - name: "IPFS Configuration" + description: "Configure Storage for IPFS" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-service.apiPort" + path: "/webui" + +questions: + - 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/chia/1.0.0/requirements.lock b/charts/chia/1.0.0/requirements.lock new file mode 100644 index 0000000000..5c4530719f --- /dev/null +++ b/charts/chia/1.0.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../library/common/2104.0.0 + version: 2104.0.0 +digest: sha256:f0aa221073aafcc5e1602c2a9acb1a508ce72f6847c33dd4a9f9fe10017d5009 +generated: "2021-04-08T16:09:30.006044+05:00" diff --git a/charts/chia/1.0.0/templates/NOTES.txt b/charts/chia/1.0.0/templates/NOTES.txt new file mode 100644 index 0000000000..cb1d892a3b --- /dev/null +++ b/charts/chia/1.0.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/chia/1.0.0/templates/deployment.yaml b/charts/chia/1.0.0/templates/deployment.yaml new file mode 100644 index 0000000000..c830a17a16 --- /dev/null +++ b/charts/chia/1.0.0/templates/deployment.yaml @@ -0,0 +1,58 @@ +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.storage.allAppVolumes" .Values | nindent 6 }} diff --git a/charts/chia/1.0.0/templates/service.yaml b/charts/chia/1.0.0/templates/service.yaml new file mode 100644 index 0000000000..4cc9718639 --- /dev/null +++ b/charts/chia/1.0.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/chia/1.0.0/templates/serviceaccount.yaml b/charts/chia/1.0.0/templates/serviceaccount.yaml new file mode 100644 index 0000000000..12bd3f4a39 --- /dev/null +++ b/charts/chia/1.0.0/templates/serviceaccount.yaml @@ -0,0 +1 @@ +{{ include "common.serviceaccount" . }} diff --git a/charts/chia/1.0.0/test_values.yaml b/charts/chia/1.0.0/test_values.yaml new file mode 100644 index 0000000000..a0ada7d3dd --- /dev/null +++ b/charts/chia/1.0.0/test_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 + 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" diff --git a/charts/chia/1.0.0/values.yaml b/charts/chia/1.0.0/values.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/charts/chia/item.yaml b/charts/chia/item.yaml new file mode 100644 index 0000000000..ba17eb947b --- /dev/null +++ b/charts/chia/item.yaml @@ -0,0 +1,5 @@ +categories: + - storage + - crypto + - +icon_url: https://www.chia.net/img/chia_logo.svg