Skip to content

Commit

Permalink
add default faucet to defaults.yaml file, use faucet.type to set imag…
Browse files Browse the repository at this point in the history
…e and params for it (#243)
  • Loading branch information
Anmol1696 authored Sep 15, 2023
1 parent 6b2102d commit 1b0afa4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
5 changes: 5 additions & 0 deletions charts/devnet/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -707,3 +707,8 @@ defaultScripts:
buildChain:
name: build-chain.sh
file: scripts/build-chain.sh

defaultFaucet:
cosmjs:
image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.31.1
concurrency: 5
5 changes: 5 additions & 0 deletions charts/devnet/templates/chains/cosmos/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{{ $faucet := get $chain "faucet" | default dict }}
{{ $faucet = mergeOverwrite ($.Values.faucet | deepCopy) $faucet }}

{{ $defaultFaucet := get $defaultFile.defaultFaucet $faucet.type | default dict }}
{{ $faucet = merge $faucet $defaultFaucet }}

{{ $image := $chain.image }}
{{- if $toBuild }}
{{ $image = "ghcr.io/cosmology-tech/starship/runner:latest" }}
Expand Down Expand Up @@ -177,6 +180,7 @@ spec:
- mountPath: /configs
name: addresses
{{- if $faucet.enabled }}
{{- if eq $faucet.type "cosmjs" }}
- name: faucet
image: {{ $faucet.image }}
imagePullPolicy: Always
Expand Down Expand Up @@ -235,6 +239,7 @@ spec:
initialDelaySeconds: 10
periodSeconds: 10
{{- end }}
{{- end }}
volumes:
- name: node
emptyDir: { }
Expand Down
12 changes: 12 additions & 0 deletions charts/devnet/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
"enabled": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"cosmjs"
]
},
"image": {
"type": "string"
},
Expand Down Expand Up @@ -210,6 +216,12 @@
"enabled": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"cosmjs"
]
},
"image": {
"type": "string"
},
Expand Down
19 changes: 9 additions & 10 deletions charts/devnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ exposer:
cpu: "0.2"
memory: "200M"

faucet:
enabled: true
image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.31.1
concurrency: 10
ports:
rest: 8000
resources:
cpu: "0.2"
memory: "200M"

# Chain timeouts
timeouts:
time_iota_ms: 10
Expand Down Expand Up @@ -228,3 +218,12 @@ registry:
resources:
cpu: "0.2"
memory: "200M"

faucet:
enabled: true
type: cosmjs
ports:
rest: 8000
resources:
cpu: "0.2"
memory: "200M"

0 comments on commit 1b0afa4

Please sign in to comment.