(theoretically) functional deployment
This commit is contained in:
parent
8f23a4747d
commit
25cc0fa300
37
deployment/deployment.yaml
Normal file
37
deployment/deployment.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nav-backend
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nav-backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nav-backend
|
||||
spec:
|
||||
containers:
|
||||
- name: worker
|
||||
image: backend-image
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: NUM_WORKERS
|
||||
value: "3"
|
||||
- name: OSM_CACHE_DIR
|
||||
value: "/osm-cache"
|
||||
volumeMounts:
|
||||
- name: osm-cache
|
||||
mountPath: /osm-cache
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 4
|
||||
memory: 8Gi
|
||||
volumes:
|
||||
- name: osm-cache
|
||||
emptyDir: {}
|
15
deployment/ingress.yaml
Normal file
15
deployment/ingress.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
kind: IngressRoute
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
metadata:
|
||||
name: nav-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`nav.kluster.moll.re`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: nav-service
|
||||
port: 8000
|
||||
tls:
|
||||
certResolver: default-tls
|
@ -0,0 +1,15 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
|
||||
namespace: nav
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
|
||||
images:
|
||||
- name: backend-image
|
||||
newName: git.kluster.moll.re/remoll/fast_network_navigation/backend
|
||||
newTag: latest
|
4
deployment/namespace.yaml
Normal file
4
deployment/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: placeholder
|
11
deployment/pvc.yaml
Normal file
11
deployment/pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: cache
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: "5Gi"
|
11
deployment/service.yaml
Normal file
11
deployment/service.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nav-service
|
||||
spec:
|
||||
selector:
|
||||
app: nav-backend
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
targetPort: 8000
|
Loading…
x
Reference in New Issue
Block a user