mirror of
https://github.com/truenas/charts.git
synced 2026-04-09 21:59:10 +08:00
Setup chia deployment
This commit is contained in:
@@ -13,46 +13,14 @@ spec:
|
||||
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
|
||||
- name: chia-network
|
||||
protocol: TCP
|
||||
containerPort: 8444
|
||||
hostPort: 8444
|
||||
{{ include "common.containers.allEnvironmentVariables" .Values | nindent 10 }}
|
||||
{{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{{ $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 }}
|
||||
@@ -1 +0,0 @@
|
||||
{{ include "common.serviceaccount" . }}
|
||||
Reference in New Issue
Block a user