initial migration
This commit is contained in:
81
apps/pix2tex/deployment.yaml
Normal file
81
apps/pix2tex/deployment.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pix2tex
|
||||
labels:
|
||||
app: pix2tex
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pix2tex
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pix2tex
|
||||
spec:
|
||||
containers:
|
||||
- name: pix2tex
|
||||
image: lukasblecher/pix2tex:api
|
||||
tty: true
|
||||
resources:
|
||||
requests:
|
||||
memory: "250M"
|
||||
cpu: 500m
|
||||
ephemeral-storage: "2Gi"
|
||||
limits:
|
||||
ephemeral-storage: "4Gi"
|
||||
memory: "500M"
|
||||
cpu: 1000m
|
||||
ports:
|
||||
- containerPort: 8501
|
||||
command: ["python", "pix2tex/api/run.py"]
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pix2tex-http
|
||||
namespace: pix2tex
|
||||
labels:
|
||||
app: pix2tex
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8501
|
||||
targetPort: 8501
|
||||
selector:
|
||||
app: pix2tex
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: pix2tex-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`pix2tex.kluster.moll.re`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: pix2tex-websocket
|
||||
services:
|
||||
- name: pix2tex-http
|
||||
port: 8501
|
||||
tls:
|
||||
certResolver: default-tls
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: pix2tex-websocket
|
||||
spec:
|
||||
headers:
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: "https"
|
||||
# enable websockets
|
||||
Upgrade: "websocket"
|
||||
|
Reference in New Issue
Block a user