62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: django-python
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: django-webserver
|
|
namespace: django-python
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: django-python
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: django-python
|
|
spec:
|
|
containers:
|
|
- name: django-python
|
|
# image: localhost:31795/django-python
|
|
image: gitea.tryton.geeraert.eu/pi-ux-ce/django-python:1.0.0
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8000
|
|
name: webserver-port
|
|
volumeMounts:
|
|
- name: django-python-code
|
|
mountPath: /code
|
|
- name: servarr-data
|
|
mountPath: /data
|
|
readOnly: true
|
|
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 200Mi
|
|
volumes:
|
|
- name: django-python-code
|
|
persistentVolumeClaim:
|
|
claimName: django-python-code
|
|
- name: servarr-data
|
|
hostPath:
|
|
path: /data
|
|
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: webserver
|
|
namespace: django-python
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 8000
|
|
protocol: TCP
|
|
selector:
|
|
app: django-python
|