chart: load secrets into env vars

This commit is contained in:
c9s 2020-12-17 14:09:22 +08:00
parent 83cdf7dff9
commit bee06ea192
5 changed files with 28 additions and 16 deletions

View File

@ -231,6 +231,12 @@ streambook.BindStream(stream)
- /auth 92463901 - /auth 92463901
- done! your session will route to telegram - done! your session will route to telegram
## Helm Chart
```
kubectl create secret generic bbgo --from-env-file .env.local
```
## Support ## Support
### By contributing pull requests ### By contributing pull requests

View File

@ -51,6 +51,13 @@ spec:
- name: config-volume - name: config-volume
mountPath: /config mountPath: /config
{{- if .Values.dotenv.secret }}
# the "env" entries will override the environment variables from envFrom.
envFrom:
- secretRef:
name: {{ .Values.dotenv.secret }}
{{- end }}
volumes: volumes:
- name: config-volume - name: config-volume
configMap: configMap:

View File

@ -15,7 +15,10 @@ nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
configmap: configmap:
file: "config/bbgo.yaml" file: "config/bollgrid.yaml"
dotenv:
secret: "bbgo"
serviceAccount: serviceAccount:
# Specifies whether a service account should be created # Specifies whether a service account should be created

View File

@ -39,10 +39,6 @@ sessions:
exchange: max exchange: max
envVarPrefix: max envVarPrefix: max
binance:
exchange: binance
envVarPrefix: binance
backtest: backtest:
# for testing max draw down (MDD) at 03-12 # for testing max draw down (MDD) at 03-12
# see here for more details # see here for more details

View File

@ -18,9 +18,9 @@ notifications:
pnL: "bbgo-pnl" pnL: "bbgo-pnl"
sessions: sessions:
binance: # binance:
exchange: binance # exchange: binance
envVarPrefix: binance # envVarPrefix: binance
max: max:
exchange: max exchange: max
@ -38,10 +38,10 @@ riskControls:
BTCUSDT: BTCUSDT:
# basic risk control order executor # basic risk control order executor
basic: basic:
minQuoteBalance: 100.0 minQuoteBalance: 1000.0
maxBaseAssetBalance: 3.0 maxBaseAssetBalance: 0
minBaseAssetBalance: 0.0 minBaseAssetBalance: 1.0
maxOrderAmount: 2000.0 maxOrderAmount: 3000.0
backtest: backtest:
# for testing max draw down (MDD) at 03-12 # for testing max draw down (MDD) at 03-12
@ -62,7 +62,7 @@ exchangeStrategies:
- on: max - on: max
bollgrid: bollgrid:
symbol: BTCUSDT symbol: BTCUSDT
interval: 5m interval: 1h
gridNumber: 20 gridNumber: 100
quantity: 0.01 quantity: 0.002
profitSpread: 30.0 profitSpread: 10.0