Commit 67f9f344 authored by sonicaj's avatar sonicaj

Allow node port of chia app to be configurable

parent 103cd335
......@@ -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) }}
......
{{ $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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment