From e8a6ed8abb08483de97b9a9c6a3a5e49f92ba0e9 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 7 Jul 2021 22:07:34 +0500 Subject: [PATCH] Allow configuring farmr env variable --- test/chia/1.3.0/questions.yaml | 18 +++++++++++++++++- test/chia/1.3.0/templates/deployment.yaml | 1 + test/chia/1.3.0/test_values.yaml | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/test/chia/1.3.0/questions.yaml b/test/chia/1.3.0/questions.yaml index c9a9065b25..6601a6f787 100644 --- a/test/chia/1.3.0/questions.yaml +++ b/test/chia/1.3.0/questions.yaml @@ -1,6 +1,8 @@ groups: - name: "Storage" description: "Configure Storage for Chia" + - name: "Farmr.net Configuration" + description: "Configure farmr.net support" - name: "Chia Environment Variables" description: "Set the environment that will be visible to the container" @@ -11,10 +13,24 @@ portals: host: - "www.truepool.io" ports: - - 443 + - "443" path: "/kb/truepool-docker-image/" questions: + - variable: farmr_env + label: "Enable 'farmr.net' support" + group: "Farmr.net Configuration" + description: "Configure 'farmr.net' support for chia" + schema: + type: string + default: "off" + enum: + - value: "off" + description: "OFF" + - value: "farmer" + description: "FARMER" + - value: "harvester" + description: "HARVESTER" - variable: appVolumeMounts label: "Chia Storage" group: "Storage" diff --git a/test/chia/1.3.0/templates/deployment.yaml b/test/chia/1.3.0/templates/deployment.yaml index 7b3147b199..83eb2a02c6 100644 --- a/test/chia/1.3.0/templates/deployment.yaml +++ b/test/chia/1.3.0/templates/deployment.yaml @@ -30,6 +30,7 @@ spec: hostPort: 8444 {{ $envList := (default list .Values.environmentVariables) }} {{ $envList = mustAppend $envList (dict "name" "keys" "value" "/plots/keyfile") }} + {{ $envList = mustAppend $envList (dict "name" "farmr" "value" $.Values.farmr_env) }} {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }} volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} diff --git a/test/chia/1.3.0/test_values.yaml b/test/chia/1.3.0/test_values.yaml index d8b7b3a28f..15e6b6b278 100644 --- a/test/chia/1.3.0/test_values.yaml +++ b/test/chia/1.3.0/test_values.yaml @@ -11,3 +11,5 @@ appVolumeMounts: data: emptyDir: true mountPath: "/root/.chia" + +farmr_env: "off"