62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: django
|
|
namespace: vorgabenui
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: django
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: django
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 999
|
|
fsGroupChangePolicy: "OnRootMismatch"
|
|
containers:
|
|
- name: web
|
|
image: docker.io/adebaumann/vui:0.917
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8000
|
|
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: django-data-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: django
|
|
namespace: vorgabenui
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: django
|
|
ports:
|
|
- port: 8000
|
|
targetPort: 8000
|
|
|