diff --git a/charts/bbgo/Chart.yaml b/charts/bbgo/Chart.yaml index 92d9fcbb4..2f27f5ae8 100644 --- a/charts/bbgo/Chart.yaml +++ b/charts/bbgo/Chart.yaml @@ -15,9 +15,9 @@ type: application # 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. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.5 +version: 0.4.0 # 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 # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.21.0 +appVersion: 1.60.0 diff --git a/charts/bbgo/templates/cronjob_sync.yaml b/charts/bbgo/templates/cronjob_sync.yaml new file mode 100644 index 000000000..917bf3383 --- /dev/null +++ b/charts/bbgo/templates/cronjob_sync.yaml @@ -0,0 +1,53 @@ +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "bbgo.fullname" . }}-sync + {{- with .Values.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "bbgo.labels" . | nindent 4 }} +spec: + schedule: {{ .Values.sync.schedule | quote }} + jobTemplate: + spec: + template: + spec: + containers: + - name: bbgo + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- if .Values.metrics.enabled }} + - "--metrics" + - "--metrics-port" + - {{ .Values.metrics.port | quote }} + {{- end }} + - "sync" + - "--config" + - "/config/bbgo.yaml" + {{- if .Values.sync.since }} + - "--since" + - {{ .Values.sync.since | quote }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: config-volume + mountPath: /config + envFrom: + - secretRef: + name: {{ .Values.dotenv.secret | default .Release.Name }} + restartPolicy: OnFailure + volumes: + - name: config-volume + configMap: + {{- if .Values.existingConfigMap }} + name: {{ .Values.existingConfigMap }} + {{- else }} + name: {{ include "bbgo.fullname" . }} + {{- end }} diff --git a/charts/bbgo/values.yaml b/charts/bbgo/values.yaml index 4c8c40dfc..f96b462c7 100644 --- a/charts/bbgo/values.yaml +++ b/charts/bbgo/values.yaml @@ -75,11 +75,11 @@ webserver: enabled: false metrics: - enabled: false + enabled: true port: 9090 logFormatter: - enabled: false + enabled: true format: json grpc: @@ -89,6 +89,12 @@ grpc: debug: enabled: false +sync: + enabled: false + schedule: "* * * * *" + ## since: sync from time + since: false + resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little