3 changed files with 121 additions and 3 deletions
@ -0,0 +1,118 @@ |
|||||
|
# Deployment description |
||||
|
apiVersion: apps/v1 |
||||
|
kind: Deployment |
||||
|
metadata: |
||||
|
name: bioplus-deployment |
||||
|
namespace: dev-environment |
||||
|
labels: |
||||
|
app: bioplus-dev |
||||
|
spec: |
||||
|
strategy: |
||||
|
type: Recreate |
||||
|
replicas: 1 |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: bioplus-dev |
||||
|
template: |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: bioplus-dev |
||||
|
spec: |
||||
|
securityContext: |
||||
|
runAsUser: 1000 |
||||
|
runAsGroup: 1000 |
||||
|
fsGroup: 1000 |
||||
|
containers: |
||||
|
- name: bioplus |
||||
|
image: packages.semapp.lan:5000/bioplus_backend:develop |
||||
|
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-dev-config-dev |
||||
|
volumeMounts: |
||||
|
- mountPath: bioplus_wagtail/media/. |
||||
|
name: bioplus-pv-dev |
||||
|
volumes: |
||||
|
- name: bioplus-pv-dev |
||||
|
persistentVolumeClaim: |
||||
|
claimName: bioplus-pvc-dev |
||||
|
--- |
||||
|
apiVersion: v1 |
||||
|
kind: ConfigMap |
||||
|
metadata: |
||||
|
namespace: dev-environment |
||||
|
name: bioplus-dev-config-dev |
||||
|
labels: |
||||
|
app: bioplus-dev |
||||
|
data: |
||||
|
DJANGO_DB_ENGINE: "django.db.backends.postgresql_psycopg2" |
||||
|
DJANGO_DB_NAME: "bioplus-wagtail" |
||||
|
DJANGO_DB_USER: "bioplus-wagtail" |
||||
|
DJANGO_DB_PASSWORD: "bioplus-wagtail" |
||||
|
DJANGO_DB_HOST: "postgres-lb" |
||||
|
DJANGO_DB_PORT: "5432" |
||||
|
|
||||
|
--- |
||||
|
# Persistent Volume Claim description |
||||
|
apiVersion: v1 |
||||
|
kind: PersistentVolumeClaim |
||||
|
metadata: |
||||
|
name: bioplus-pvc-dev |
||||
|
namespace: dev-environment |
||||
|
labels: |
||||
|
app: bioplus-dev |
||||
|
spec: |
||||
|
storageClassName: longhorn |
||||
|
accessModes: |
||||
|
- ReadWriteOnce |
||||
|
resources: |
||||
|
requests: |
||||
|
storage: 1Gi |
||||
|
--- |
||||
|
# semapp Service |
||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
name: bioplus |
||||
|
namespace: dev-environment |
||||
|
spec: |
||||
|
selector: |
||||
|
app: bioplus-dev |
||||
|
ports: |
||||
|
- name: bioplus-http |
||||
|
port: 8000 |
||||
|
targetPort: bioplus-http |
||||
|
type: NodePort |
||||
|
--- |
||||
|
|
||||
|
# Ingress description |
||||
|
apiVersion: networking.k8s.io/v1 |
||||
|
kind: Ingress |
||||
|
metadata: |
||||
|
name: bioplus-dev-ingress |
||||
|
namespace: dev-environment |
||||
|
annotations: |
||||
|
kubernetes.io/ingress.class: "traefik" |
||||
|
spec: |
||||
|
rules: |
||||
|
- host: bioplus-dev.k3s.semapp.lan |
||||
|
http: |
||||
|
paths: |
||||
|
- backend: |
||||
|
service: |
||||
|
name: bioplus |
||||
|
port: |
||||
|
number: 8000 |
||||
|
path: / |
||||
|
pathType: ImplementationSpecific |
||||
Loading…
Reference in new issue