mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
charts: improve bbgo chart configmap loading
This commit is contained in:
parent
b0b2165ae4
commit
c5c7b6f897
|
@ -1,6 +1,6 @@
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: bbgo
|
name: bbgo
|
||||||
description: a helm chart for bbgo trading bot
|
description: Helm chart for bbgo trading bot
|
||||||
|
|
||||||
# A chart can be either an 'application' or a 'library' chart.
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
#
|
#
|
||||||
|
@ -15,9 +15,9 @@ type: application
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.1.0
|
version: 0.2.0
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 1.16.0
|
appVersion: 1.15.0
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../config
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- if .Values.configmap.enabled }}
|
{{- if .Values.configmap }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
|
@ -7,6 +7,12 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "bbgo.labels" . | nindent 4 }}
|
{{- include "bbgo.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
|
# if configmap is given as a string, we read it as a file
|
||||||
|
{{- if eq "string" (typeOf .Values.configmap) }}
|
||||||
bbgo.yaml: |-
|
bbgo.yaml: |-
|
||||||
{{- .Files.Get .Values.configmap.file | nindent 4 }}
|
{{- .Files.Get .Values.configmap | nindent 4 }}
|
||||||
|
{{- else }}
|
||||||
|
bbgo.yaml:
|
||||||
|
{{- .Values.configmap | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -59,7 +59,11 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
|
{{- if .Values.existingConfigMap }}
|
||||||
|
name: {{ .Values.existingConfigMap }}
|
||||||
|
{{- else }}
|
||||||
name: {{ include "bbgo.fullname" . }}
|
name: {{ include "bbgo.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
|
|
|
@ -15,9 +15,12 @@ imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
fullnameOverride: ""
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
# existingConfigMap is used for loading the existing configmap
|
||||||
|
existingConfigMap:
|
||||||
|
|
||||||
|
# configmap could be a string pointing to the local file in the chart
|
||||||
|
# or a object with inlined bbgo yaml config
|
||||||
configmap:
|
configmap:
|
||||||
enabled: true
|
|
||||||
file: "config/bbgo.yaml"
|
|
||||||
|
|
||||||
dotenv:
|
dotenv:
|
||||||
secret: null
|
secret: null
|
||||||
|
|
Loading…
Reference in New Issue
Block a user