-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added an optional cronjob to perform the dbclean (external trig…
…ger) (#52) Signed-off-by: Sherif Ayad <[email protected]>
- Loading branch information
1 parent
5e75ac2
commit 37a7833
Showing
7 changed files
with
147 additions
and
75 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
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
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,33 @@ | ||
{{- if and (.Values.broker.config.databaseClean.enabled) (eq .Values.broker.config.databaseClean.mode "external") }} | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-dbclean | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
name: {{ include "chart.fullname" . }} | ||
app.kubernetes.io/name: {{ include "chart.name" . }} | ||
helm.sh/chart: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
schedule: {{ .Values.broker.config.databaseClean.cronSchedule | quote }} | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: {{ template "chart.fullname" . }}-dbclean | ||
image: {{ template "broker.image" . }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- clean | ||
env: | ||
# Logging | ||
{{- include "envVars.logging" . | nindent 16 }} | ||
# Database | ||
{{- include "envVars.db" . | nindent 16 }} | ||
# Database clean up (external mode) | ||
{{- include "envVars.dbCleanup" . | nindent 16 }} | ||
restartPolicy: Never | ||
{{- end}} |
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