You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.7 KiB

# Deployment description
apiVersion: apps/v1
kind: Deployment
metadata:
name: bioplus-deployment
namespace: prod-environment
labels:
app: bioplus-prod
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: bioplus-prod
template:
metadata:
labels:
app: bioplus-prod
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: bioplus
image: packages.semapp.lan:5000/bioplus_backend:V1.0.4
imagePullPolicy: Always
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "4"
ports:
- containerPort: 8000
name: bioplus-http
protocol: TCP
envFrom:
- configMapRef:
name: bioplus-prod-config-prod
volumeMounts:
- mountPath: bioplus_wagtail/media/.
name: bioplus-pv-prod
volumes:
- name: bioplus-pv-prod
persistentVolumeClaim:
claimName: bioplus-pvc-prod
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: prod-environment
name: bioplus-prod-config-prod
labels:
app: bioplus-prod
data:
DJANGO_DB_ENGINE: "django.db.backends.postgresql_psycopg2"
DJANGO_DB_NAME: "bioplus-wagtail"
DJANGO_DB_USER: "bioplus-wagtail"
DJANGO_DB_PASSWORD: "jNeF7PfvrDG1bJLNCibb"
DJANGO_DB_HOST: "psql.semprod.local"
DJANGO_DB_PORT: "5432"
---
# Persistent Volume Claim description
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: bioplus-pvc-prod
namespace: prod-environment
labels:
app: bioplus-prod
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
# semapp Service
apiVersion: v1
kind: Service
metadata:
name: bioplus
namespace: prod-environment
spec:
selector:
app: bioplus-prod
ports:
- name: bioplus-http
port: 8000
targetPort: bioplus-http
type: NodePort
---
# Ingress description
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: bioplus-prod-ingress
namespace: prod-environment
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
rules:
- host: bioplus.k8s.semprod.local
http:
paths:
- backend:
service:
name: bioplus
port:
number: 8000
path: /
pathType: ImplementationSpecific
- host: bioplus.semapp.de
http:
paths:
- backend:
service:
name: bioplus
port:
number: 8000
path: /
pathType: ImplementationSpecific