-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from bitholla/develop
hex-cli v1.5.2 release
- Loading branch information
Showing
9 changed files
with
1,321 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
kubernetes/helm-chart/bitholla-hex-server/templates/job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
{{- if .Values.job.enable }} | ||
|
||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
labels: | ||
app: {{.Release.Name}} | ||
role: {{.Release.Namespace}} | ||
name: {{.Release.Name}} | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
template: | ||
spec: | ||
|
||
{{- if .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.nodeSelector | indent 8 }} | ||
{{- end }} | ||
|
||
containers: | ||
- name: {{.Release.Name}} | ||
image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} | ||
command: ["/bin/bash", "-c"] | ||
|
||
{{- if eq .Values.job.mode "add_coin" }} | ||
|
||
args: | ||
- node tools/dbs/addCoin.js; | ||
|
||
{{- else if eq .Values.job.mode "remove_coin" }} | ||
|
||
args: | ||
- node tools/dbs/removeCoin.js; | ||
|
||
{{- else if eq .Values.job.mode "add_pair" }} | ||
|
||
args: | ||
- node tools/dbs/addPair.js; | ||
|
||
{{- else if eq .Values.job.mode "remove_pair" }} | ||
|
||
args: | ||
- node tools/dbs/removePair.js; | ||
|
||
{{- end }} | ||
|
||
imagePullPolicy: Always | ||
|
||
envFrom: | ||
- configMapRef: | ||
name: {{.Values.envName}} | ||
- secretRef: | ||
name: {{.Values.secretName}} | ||
|
||
env: | ||
|
||
{{- if eq .Values.job.mode "add_coin" }} | ||
|
||
- name: DEPLOYMENT_MODE | ||
value: {{.Values.DEPLOYMENT_MODE}} | ||
- name: COIN_SYMBOL | ||
value: {{.Values.job.env.coin_symbol}} | ||
- name: COIN_FULLNAME | ||
value: {{.Values.job.env.coin_fullname}} | ||
- name: COIN_ALLOW_DEPOSIT | ||
value: {{.Values.job.env.coin_allow_deposit | quote }} | ||
- name: COIN_ALLOW_WITHDRAWAL | ||
value: {{.Values.job.env.coin_allow_withdrawal | quote }} | ||
- name: COIN_WITHDRAWAL_FEE | ||
value: {{.Values.job.env.coin_withdrawal_fee | quote }} | ||
- name: COIN_MIN | ||
value: {{.Values.job.env.coin_min | quote }} | ||
- name: COIN_MAX | ||
value: {{.Values.job.env.coin_max | quote }} | ||
- name: COIN_INCREMENT_UNIT | ||
value: {{.Values.job.env.coin_increment_unit | quote }} | ||
- name: COIN_DEPOSIT_LIMITS | ||
value: {{.Values.job.env.coin_deposit_limits | quote}} | ||
- name: COIN_WITHDRAWAL_LIMITS | ||
value: {{.Values.job.env.coin_withdrawal_limits | quote }} | ||
- name: COIN_ACTIVE | ||
value: {{.Values.job.env.coin_active | quote }} | ||
|
||
{{- else if eq .Values.job.mode "remove_coin" }} | ||
|
||
- name: COIN_SYMBOL | ||
value: {{.Values.job.env.coin_symbol}} | ||
|
||
{{- else if eq .Values.job.mode "add_pair" }} | ||
|
||
- name: PAIR_NAME | ||
value: {{.Values.job.env.pair_name}} | ||
- name: PAIR_BASE | ||
value: {{.Values.job.env.pair_base}} | ||
- name: PAIR_2 | ||
value: {{.Values.job.env.pair_2}} | ||
- name: TAKER_FEES | ||
value: {{.Values.job.env.taker_fees | quote }} | ||
- name: MAKER_FEES | ||
value: {{.Values.job.env.maker_fees | quote }} | ||
- name: MIN_SIZE | ||
value: {{.Values.job.env.min_size | quote }} | ||
- name: MAX_SIZE | ||
value: {{.Values.job.env.max_size | quote }} | ||
- name: MIN_PRICE | ||
value: {{.Values.job.env.min_price | quote }} | ||
- name: MAX_PRICE | ||
value: {{.Values.job.env.max_price | quote }} | ||
- name: INCREMENT_SIZE | ||
value: {{.Values.job.env.increment_size | quote }} | ||
- name: INCREMENT_PRICE | ||
value: {{.Values.job.env.increment_price | quote }} | ||
- name: PAIR_ACTIVE | ||
value: {{.Values.job.env.pair_active | quote }} | ||
|
||
{{- else if eq .Values.job.mode "remove_pair" }} | ||
|
||
- name: PAIR_NAME | ||
value: {{.Values.job.env.pair_name}} | ||
|
||
{{- end }} | ||
|
||
resources: | ||
limits: | ||
memory: "300Mi" | ||
cpu: "100m" | ||
requests: | ||
memory: "50Mi" | ||
cpu: "15m" | ||
|
||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
restartPolicy: Never | ||
backoffLimit: 0 | ||
{{- end }} |
Oops, something went wrong.