Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
a5b21a80
Commit
a5b21a80
authored
Oct 08, 2021
by
sonicaj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow specifying farmer port for chia application
parent
7f4906bd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
6 deletions
+41
-6
test/chia/1.3.18/questions.yaml
test/chia/1.3.18/questions.yaml
+8
-0
test/chia/1.3.18/templates/deployment.yaml
test/chia/1.3.18/templates/deployment.yaml
+4
-4
test/chia/1.3.18/templates/networking.tpl
test/chia/1.3.18/templates/networking.tpl
+21
-0
test/chia/1.3.18/templates/service.yaml
test/chia/1.3.18/templates/service.yaml
+7
-2
test/chia/1.3.18/test_values.yaml
test/chia/1.3.18/test_values.yaml
+1
-0
No files found.
test/chia/1.3.18/questions.yaml
View file @
a5b21a80
...
...
@@ -172,3 +172,11 @@ questions:
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
test/chia/1.3.18/templates/deployment.yaml
View file @
a5b21a80
...
...
@@ -16,7 +16,7 @@ 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
lt (.Values.service.nodePort | int) 9000
}}
{{
if
eq (include "hostNetworkingEnabled" .) "true"
}}
hostNetwork
:
true
{{
end
}}
containers
:
...
...
@@ -31,9 +31,9 @@ spec:
-
name
:
chia-network
protocol
:
TCP
containerPort
:
8444
{{
if lt (.Values.service.nodePort | int) 9000
}}
hostPort
:
{{
.Values.service.nodePort
}}
{{
end
}}
-
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)
}}
...
...
test/chia/1.3.18/templates/networking.tpl
0 → 100644
View file @
a5b21a80
{{
/*
Formats
volumeMount
for
Minio
tls
keys
and
trusted
certs
*/
}}
{{- define "hostNetworkingEnabled" -}}
{{- if or (lt (.Values.service.nodePort | int) 9000) (lt (.Values.service.farmerPort | int) 9000) -}}
{{- print "true" -}}
{{- else -}}
{{- print "false" -}}
{{- end -}}
{{- end -}}
{
{
/*
Formats
volume
for
Minio
tls
keys
and
trusted
certs
*/
}
}
{{- define "enableService" -}}
{{- if or (ge (.Values.service.nodePort | int) 9000) (ge (.Values.service.farmerPort | int) 9000) -}}
{{- print "true" -}}
{{- else -}}
{{- print "false" -}}
{{- end -}}
{{- end -}}
test/chia/1.3.18/templates/service.yaml
View file @
a5b21a80
{{
if eq (include "enableService" .) "true"
}}
{{
$svc
:
= .Values.service
}}
{{
if ge ($svc.nodePort | int) 9000
}}
{{
$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
}}
...
...
test/chia/1.3.18/test_values.yaml
View file @
a5b21a80
...
...
@@ -13,3 +13,4 @@ image:
updateStrategy
:
Recreate
service
:
nodePort
:
33121
farmerPort
:
33122
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment