Skip to content
Snippets Groups Projects
Commit 04af6e84 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Merge branch '2-enable-celery' into 'master'

Resolve "Enable Celery"

Closes #2

See merge request AlekSIS/Deployment/AlekSIS-k8s!4
parents 4aa0e717 8f4fff10
No related branches found
No related tags found
1 merge request!4Resolve "Enable Celery"
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aleksis.fullname" . }}
name: {{ include "aleksis.fullname" . }}-app
labels:
{{- include "aleksis.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.replicaCount.app }}
{{- end }}
selector:
matchLabels:
......@@ -134,3 +134,178 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aleksis.fullname" . }}-celery-worker
labels:
{{- include "aleksis.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount.celery }}
{{- end }}
selector:
matchLabels:
{{- include "aleksis.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "aleksis.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "aleksis.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-celery-worker
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: RUN_MODE
value: celery-worker
- name: ALEKSIS_database__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
key: postgresql-password
value: "{{ .Values.postgresql.postgresqlPassword }}"
- name: ALEKSIS_secret_key
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-{{ template "aleksis.name" . }}"
key: secret-key
- name: ALEKSIS_auth__superuser__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-{{ template "aleksis.name" . }}"
key: admin-password
- name: ALEKSIS_redis__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-redis"
key: redis-password
volumeMounts:
- mountPath: /var/lib/aleksis/media
name: {{ template "aleksis.fullname" . }}-aleksis-media
- mountPath: /usr/share/aleksis/static
name: {{ template "aleksis.fullname" . }}-aleksis-static
- mountPath: /var/lib/aleksis/backup
name: {{ template "aleksis.fullname" . }}-aleksis-backup
- mountPath: /etc/aleksis
name: {{ template "aleksis.fullname" . }}-config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: {{ template "aleksis.fullname" . }}-aleksis-media
persistentVolumeClaim:
claimName: {{ template "aleksis.fullname" . }}-aleksis-media
- name: {{ template "aleksis.fullname" . }}-aleksis-static
persistentVolumeClaim:
claimName: {{ template "aleksis.fullname" . }}-aleksis-static
- name: {{ template "aleksis.fullname" . }}-aleksis-backup
persistentVolumeClaim:
claimName: {{ template "aleksis.fullname" . }}-aleksis-backup
- name: {{ template "aleksis.fullname" . }}-config
configMap:
name: {{ template "aleksis.fullname" . }}-config
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aleksis.fullname" . }}-celery-beat
labels:
{{- include "aleksis.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "aleksis.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "aleksis.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "aleksis.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-celery-beat
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: RUN_MODE
value: celery-beat
- name: ALEKSIS_database__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
key: postgresql-password
value: "{{ .Values.postgresql.postgresqlPassword }}"
- name: ALEKSIS_secret_key
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-{{ template "aleksis.name" . }}"
key: secret-key
- name: ALEKSIS_auth__superuser__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-{{ template "aleksis.name" . }}"
key: admin-password
- name: ALEKSIS_redis__password
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-redis"
key: redis-password
volumeMounts:
- mountPath: /etc/aleksis
name: {{ template "aleksis.fullname" . }}-config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: {{ template "aleksis.fullname" . }}-config
configMap:
name: {{ template "aleksis.fullname" . }}-config
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
......@@ -2,7 +2,9 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
replicaCount:
app: 1
celery: 1
image:
repository: registry.edugit.org/aleksis/official/aleksis
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment