mirror of
https://github.com/truenas/charts.git
synced 2026-11-27 22:42:09 +08:00
Allow node port of chia app to be configurable
This commit is contained in:
@@ -5,6 +5,8 @@ groups:
|
||||
description: "Configure farmr.net support"
|
||||
- name: "Chia Environment Variables"
|
||||
description: "Set the environment that will be visible to the container"
|
||||
- name: "Networking"
|
||||
description: "Configure networking for Chia container"
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
@@ -153,3 +155,20 @@ questions:
|
||||
label: "Value"
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- variable: service
|
||||
description: "Networking Configuration"
|
||||
label: "Networking Configuration"
|
||||
group: "Networking"
|
||||
schema:
|
||||
type: dict
|
||||
required: true
|
||||
attrs:
|
||||
- variable: nodePort
|
||||
label: "Node Port to use for Chia"
|
||||
schema:
|
||||
type: int
|
||||
min: 8000
|
||||
max: 65535
|
||||
default: 8444
|
||||
required: true
|
||||
|
||||
@@ -27,7 +27,9 @@ spec:
|
||||
- name: chia-network
|
||||
protocol: TCP
|
||||
containerPort: 8444
|
||||
hostPort: 8444
|
||||
{{ if lt .Values.service.nodePort 9000 }}
|
||||
hostPort: {{ .Values.service.nodePort }}
|
||||
{{ end }}
|
||||
{{ $envList := (default list .Values.environmentVariables) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "keys" "value" "/plots/keyfile") }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "farmr" "value" $.Values.farmr_env) }}
|
||||
|
||||
8
test/chia/1.3.18/templates/service.yaml
Normal file
8
test/chia/1.3.18/templates/service.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $svc := .Values.service }}
|
||||
{{ if ge $svc.nodePort 9000 }}
|
||||
{{ $ports := list }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "chia-network" "port" $svc.nodePort "nodePort" $svc.nodePort "targetPort" 8444) }}
|
||||
{{ $params := . }}
|
||||
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
|
||||
{{ include "common.classes.service" $params }}
|
||||
{{ end }}
|
||||
@@ -11,3 +11,5 @@ image:
|
||||
repository: ixsystems/chia-docker
|
||||
tag: v1.2.8
|
||||
updateStrategy: Recreate
|
||||
service:
|
||||
nodePort: 33121
|
||||
|
||||
Reference in New Issue
Block a user