Skip to content
Snippets Groups Projects
Commit 466e8d30 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

remove cronJob

parent b96c2d8a
No related branches found
No related tags found
No related merge requests found
Pipeline #125583 passed
{{- if .Values.cleanSessions.enabled -}}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "djangoninja.cleanSessionsCronName" . }}
labels:
{{- include "djangoninja.labels" . | nindent 4 }}
role: "clean-sessions"
spec:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 2
schedule: "0 */2 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: Never
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: {{ printf "%s-clean-sessions" .Release.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["python"]
args: ["manage.py", "clear-sessions-history"]
imagePullPolicy: Always
envFrom:
- configMapRef:
name: galaxy-config-map
env:
- name: DEBUG
value: "True"
- name: SECRET_KEY
value: {{ .Values.django.secret }}
- name: GALAXY_API_KEY
valueFrom:
secretKeyRef:
name: galaxy-secret
key: galaxy_key
- name: DF_HOSTNAME
value: {{ .Release.Name }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Values.postgresql.user }}.{{ .Values.postgresql.teamId }}-postgresql.credentials.postgresql.acid.zalan.do"
key: password
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: "{{ .Values.postgresql.user }}.{{ .Values.postgresql.teamId }}-postgresql.credentials.postgresql.acid.zalan.do"
key: username
- name: POSTGRES_DB
value: {{ .Values.postgresql.name }}
- name: DATABASE_URL
value: "psql://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@{{ .Values.postgresql.teamId }}-postgresql:5432/$(POSTGRES_DB)"
securityContext:
{{- toYaml .Values.securityContext | nindent 14 }}
{{- end }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment