From bb453a39fa4fac666ca95d92f5be8dabcfdad09c Mon Sep 17 00:00:00 2001 From: sonicaj Date: Sun, 10 Oct 2021 18:04:39 +0500 Subject: [PATCH] Update stable train from test train --- charts/chia/{1.3.17 => 1.3.18}/.helmignore | 0 charts/chia/{1.3.17 => 1.3.18}/Chart.yaml | 2 +- charts/chia/{1.3.17 => 1.3.18}/README.md | 0 charts/chia/{1.3.17 => 1.3.18}/app-readme.md | 0 .../charts/common-2105.0.0.tgz | Bin .../{1.3.17 => 1.3.18}/default_values.yaml | 0 charts/chia/{1.3.17 => 1.3.18}/ix_values.yaml | 0 charts/chia/{1.3.17 => 1.3.18}/questions.yaml | 27 ++++++++++++++++++ .../chia/{1.3.17 => 1.3.18}/requirements.lock | 0 .../templates/deployment.yaml | 8 +++++- .../templates/generate-mnemonic.yaml | 0 .../templates/mnemonic-configmap.yaml | 0 charts/chia/1.3.18/templates/networking.tpl | 21 ++++++++++++++ charts/chia/1.3.18/templates/service.yaml | 13 +++++++++ .../chia/{1.3.17 => 1.3.18}/test_values.yaml | 3 ++ charts/chia/{1.3.17 => 1.3.18}/values.yaml | 0 test/chia/1.3.18/templates/networking.tpl | 4 +-- test/chia/1.3.18/test_values.yaml | 4 +-- 18 files changed, 76 insertions(+), 6 deletions(-) rename charts/chia/{1.3.17 => 1.3.18}/.helmignore (100%) rename charts/chia/{1.3.17 => 1.3.18}/Chart.yaml (96%) rename charts/chia/{1.3.17 => 1.3.18}/README.md (100%) rename charts/chia/{1.3.17 => 1.3.18}/app-readme.md (100%) rename charts/chia/{1.3.17 => 1.3.18}/charts/common-2105.0.0.tgz (100%) rename charts/chia/{1.3.17 => 1.3.18}/default_values.yaml (100%) rename charts/chia/{1.3.17 => 1.3.18}/ix_values.yaml (100%) rename charts/chia/{1.3.17 => 1.3.18}/questions.yaml (87%) rename charts/chia/{1.3.17 => 1.3.18}/requirements.lock (100%) rename charts/chia/{1.3.17 => 1.3.18}/templates/deployment.yaml (89%) rename charts/chia/{1.3.17 => 1.3.18}/templates/generate-mnemonic.yaml (100%) rename charts/chia/{1.3.17 => 1.3.18}/templates/mnemonic-configmap.yaml (100%) create mode 100644 charts/chia/1.3.18/templates/networking.tpl create mode 100644 charts/chia/1.3.18/templates/service.yaml rename charts/chia/{1.3.17 => 1.3.18}/test_values.yaml (83%) rename charts/chia/{1.3.17 => 1.3.18}/values.yaml (100%) diff --git a/charts/chia/1.3.17/.helmignore b/charts/chia/1.3.18/.helmignore similarity index 100% rename from charts/chia/1.3.17/.helmignore rename to charts/chia/1.3.18/.helmignore diff --git a/charts/chia/1.3.17/Chart.yaml b/charts/chia/1.3.18/Chart.yaml similarity index 96% rename from charts/chia/1.3.17/Chart.yaml rename to charts/chia/1.3.18/Chart.yaml index 6ea63093df..2aa2e9603f 100644 --- a/charts/chia/1.3.17/Chart.yaml +++ b/charts/chia/1.3.18/Chart.yaml @@ -15,4 +15,4 @@ name: chia sources: - https://github.com/Chia-Network/chia-blockchain - https://github.com/orgs/chia-network/packages/container/package/chia -version: 1.3.17 +version: 1.3.18 diff --git a/charts/chia/1.3.17/README.md b/charts/chia/1.3.18/README.md similarity index 100% rename from charts/chia/1.3.17/README.md rename to charts/chia/1.3.18/README.md diff --git a/charts/chia/1.3.17/app-readme.md b/charts/chia/1.3.18/app-readme.md similarity index 100% rename from charts/chia/1.3.17/app-readme.md rename to charts/chia/1.3.18/app-readme.md diff --git a/charts/chia/1.3.17/charts/common-2105.0.0.tgz b/charts/chia/1.3.18/charts/common-2105.0.0.tgz similarity index 100% rename from charts/chia/1.3.17/charts/common-2105.0.0.tgz rename to charts/chia/1.3.18/charts/common-2105.0.0.tgz diff --git a/charts/chia/1.3.17/default_values.yaml b/charts/chia/1.3.18/default_values.yaml similarity index 100% rename from charts/chia/1.3.17/default_values.yaml rename to charts/chia/1.3.18/default_values.yaml diff --git a/charts/chia/1.3.17/ix_values.yaml b/charts/chia/1.3.18/ix_values.yaml similarity index 100% rename from charts/chia/1.3.17/ix_values.yaml rename to charts/chia/1.3.18/ix_values.yaml diff --git a/charts/chia/1.3.17/questions.yaml b/charts/chia/1.3.18/questions.yaml similarity index 87% rename from charts/chia/1.3.17/questions.yaml rename to charts/chia/1.3.18/questions.yaml index d2e2e71a7b..29ca90ccac 100644 --- a/charts/chia/1.3.17/questions.yaml +++ b/charts/chia/1.3.18/questions.yaml @@ -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,28 @@ 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 + - variable: farmerPort + label: "Farmer Port to use for Chia" + schema: + type: int + min: 8000 + max: 65535 + default: 8447 + required: true diff --git a/charts/chia/1.3.17/requirements.lock b/charts/chia/1.3.18/requirements.lock similarity index 100% rename from charts/chia/1.3.17/requirements.lock rename to charts/chia/1.3.18/requirements.lock diff --git a/charts/chia/1.3.17/templates/deployment.yaml b/charts/chia/1.3.18/templates/deployment.yaml similarity index 89% rename from charts/chia/1.3.17/templates/deployment.yaml rename to charts/chia/1.3.18/templates/deployment.yaml index 83eb2a02c6..f9983b5b90 100644 --- a/charts/chia/1.3.17/templates/deployment.yaml +++ b/charts/chia/1.3.18/templates/deployment.yaml @@ -3,6 +3,8 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} labels: {{ include "common.labels" . | nindent 4 }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} spec: strategy: type: {{ .Values.updateStrategy }} @@ -14,7 +16,9 @@ spec: labels: {{ include "common.labels.selectorLabels" . | nindent 8 }} spec: # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router + {{ if eq (include "hostNetworkingEnabled" .) "true" }} hostNetwork: true + {{ end }} containers: - name: {{ .Chart.Name }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} @@ -27,7 +31,9 @@ spec: - name: chia-network protocol: TCP containerPort: 8444 - hostPort: 8444 + - name: chia-farmer + protocol: TCP + containerPort: 8447 {{ $envList := (default list .Values.environmentVariables) }} {{ $envList = mustAppend $envList (dict "name" "keys" "value" "/plots/keyfile") }} {{ $envList = mustAppend $envList (dict "name" "farmr" "value" $.Values.farmr_env) }} diff --git a/charts/chia/1.3.17/templates/generate-mnemonic.yaml b/charts/chia/1.3.18/templates/generate-mnemonic.yaml similarity index 100% rename from charts/chia/1.3.17/templates/generate-mnemonic.yaml rename to charts/chia/1.3.18/templates/generate-mnemonic.yaml diff --git a/charts/chia/1.3.17/templates/mnemonic-configmap.yaml b/charts/chia/1.3.18/templates/mnemonic-configmap.yaml similarity index 100% rename from charts/chia/1.3.17/templates/mnemonic-configmap.yaml rename to charts/chia/1.3.18/templates/mnemonic-configmap.yaml diff --git a/charts/chia/1.3.18/templates/networking.tpl b/charts/chia/1.3.18/templates/networking.tpl new file mode 100644 index 0000000000..280f7bdc9e --- /dev/null +++ b/charts/chia/1.3.18/templates/networking.tpl @@ -0,0 +1,21 @@ +{{/* +Enable host networking +*/}} +{{- define "hostNetworkingEnabled" -}} +{{- if or (lt (.Values.service.nodePort | int) 9000) (lt (.Values.service.farmerPort | int) 9000) -}} +{{- print "true" -}} +{{- else -}} +{{- print "false" -}} +{{- end -}} +{{- end -}} + +{{/* +Enable Node Port Service +*/}} +{{- define "enableService" -}} +{{- if or (ge (.Values.service.nodePort | int) 9000) (ge (.Values.service.farmerPort | int) 9000) -}} +{{- print "true" -}} +{{- else -}} +{{- print "false" -}} +{{- end -}} +{{- end -}} diff --git a/charts/chia/1.3.18/templates/service.yaml b/charts/chia/1.3.18/templates/service.yaml new file mode 100644 index 0000000000..bf92e8d57b --- /dev/null +++ b/charts/chia/1.3.18/templates/service.yaml @@ -0,0 +1,13 @@ +{{ if eq (include "enableService" .) "true" }} +{{ $svc := .Values.service }} +{{ $ports := list }} +{{ if ge ($svc.nodePort | int) 9000 }} +{{ $ports = mustAppend $ports (dict "name" "chia-network" "port" $svc.nodePort "nodePort" $svc.nodePort "targetPort" 8444) }} +{{ end }} +{{ if ge ($svc.farmerPort | int) 9000 }} +{{ $ports = mustAppend $ports (dict "name" "chia-farmer" "port" $svc.farmerPort "nodePort" $svc.farmerPort "targetPort" 8447) }} +{{ end }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }} +{{ include "common.classes.service" $params }} +{{ end }} \ No newline at end of file diff --git a/charts/chia/1.3.17/test_values.yaml b/charts/chia/1.3.18/test_values.yaml similarity index 83% rename from charts/chia/1.3.17/test_values.yaml rename to charts/chia/1.3.18/test_values.yaml index 448ef92450..b012433afd 100644 --- a/charts/chia/1.3.17/test_values.yaml +++ b/charts/chia/1.3.18/test_values.yaml @@ -11,3 +11,6 @@ image: repository: ixsystems/chia-docker tag: v1.2.8 updateStrategy: Recreate +service: + nodePort: 31121 + farmerPort: 31122 diff --git a/charts/chia/1.3.17/values.yaml b/charts/chia/1.3.18/values.yaml similarity index 100% rename from charts/chia/1.3.17/values.yaml rename to charts/chia/1.3.18/values.yaml diff --git a/test/chia/1.3.18/templates/networking.tpl b/test/chia/1.3.18/templates/networking.tpl index c2b2ff1344..280f7bdc9e 100644 --- a/test/chia/1.3.18/templates/networking.tpl +++ b/test/chia/1.3.18/templates/networking.tpl @@ -1,5 +1,5 @@ {{/* -Formats volumeMount for Minio tls keys and trusted certs +Enable host networking */}} {{- define "hostNetworkingEnabled" -}} {{- if or (lt (.Values.service.nodePort | int) 9000) (lt (.Values.service.farmerPort | int) 9000) -}} @@ -10,7 +10,7 @@ Formats volumeMount for Minio tls keys and trusted certs {{- end -}} {{/* -Formats volume for Minio tls keys and trusted certs +Enable Node Port Service */}} {{- define "enableService" -}} {{- if or (ge (.Values.service.nodePort | int) 9000) (ge (.Values.service.farmerPort | int) 9000) -}} diff --git a/test/chia/1.3.18/test_values.yaml b/test/chia/1.3.18/test_values.yaml index 1fb13a38ee..b012433afd 100644 --- a/test/chia/1.3.18/test_values.yaml +++ b/test/chia/1.3.18/test_values.yaml @@ -12,5 +12,5 @@ image: tag: v1.2.8 updateStrategy: Recreate service: - nodePort: 33121 - farmerPort: 33122 + nodePort: 31121 + farmerPort: 31122