First version of helm-charts
This commit is contained in:
59
k8s/helm-chart/templates/django-deployment.yaml
Normal file
59
k8s/helm-chart/templates/django-deployment.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "vorgabenui.fullname" . }}
|
||||
namespace: {{ .Values.global.namespace }}
|
||||
labels:
|
||||
{{- include "vorgabenui.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: django
|
||||
spec:
|
||||
replicas: {{ .Values.django.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "vorgabenui.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: django
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "vorgabenui.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: django
|
||||
spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.django.securityContext | nindent 8 }}
|
||||
initContainers:
|
||||
- name: loader
|
||||
image: "{{ .Values.django.dataLoader.image.repository }}:{{ .Values.django.dataLoader.image.tag }}"
|
||||
command: [ "sh","-c","cp -n preload/preload.sqlite3 /data/db.sqlite3; chown -R 999:999 /data; ls -la /data; sleep 10; exit 0" ]
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: web
|
||||
image: "{{ .Values.django.image.repository }}:{{ .Values.django.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.django.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.django.service.port }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/data
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 6
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "vorgabenui.fullname" . }}-data-pvc
|
||||
Reference in New Issue
Block a user