mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-24 15:55:14 +00:00
add cronjob for sync
This commit is contained in:
parent
bb06a6a046
commit
4bbb9c5e38
49
charts/bbgo/templates/cronjob_sync.yaml
Normal file
49
charts/bbgo/templates/cronjob_sync.yaml
Normal file
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
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"
|
||||
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 }}
|
|
@ -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,10 @@ grpc:
|
|||
debug:
|
||||
enabled: false
|
||||
|
||||
sync:
|
||||
enabled: false
|
||||
schedule: "* * * * *"
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user