87 lines
1.7 KiB
YAML
Raw Normal View History

2024-05-05 21:45:43 -07:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: <SANDBOX>
2024-05-05 21:45:43 -07:00
labels:
app: <SANDBOX>
2024-05-05 21:45:43 -07:00
spec:
replicas: 1
selector:
matchLabels:
app: <SANDBOX>
2024-05-05 21:45:43 -07:00
template:
metadata:
labels:
app: <SANDBOX>
2024-05-05 21:45:43 -07:00
spec:
volumes:
- name: workspace-volume
emptyDir: {}
containers:
- name: runner
image: ishaan1013/sandbox:latest
ports:
- containerPort: 4000
- containerPort: 8000
2024-05-05 21:45:43 -07:00
volumeMounts:
- name: workspace-volume
mountPath: /workspace
resources:
requests:
cpu: "1"
memory: "1Gi"
limits:
cpu: "1"
memory: "1Gi"
env:
- name: CF_API_TOKEN
value: <CF_API_TOKEN>
- name: CF_USER_ID
value: <CF_USER_ID>
2024-05-05 21:45:43 -07:00
---
apiVersion: v1
kind: Service
metadata:
name: <SANDBOX>
2024-05-05 21:45:43 -07:00
spec:
selector:
app: <SANDBOX>
2024-05-05 21:45:43 -07:00
ports:
- protocol: TCP
name: ws
port: 4000
targetPort: 4000
- protocol: TCP
2024-05-13 09:57:27 -07:00
name: s
port: 8000
targetPort: 8000
2024-05-05 21:45:43 -07:00
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: <SANDBOX>
2024-05-05 21:45:43 -07:00
spec:
ingressClassName: nginx
rules:
- host: <SANDBOX>.ws.ishaand.com
2024-05-05 21:45:43 -07:00
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: <SANDBOX>
2024-05-05 21:45:43 -07:00
port:
number: 4000
- host: <SANDBOX>.s.ishaand.com
2024-05-05 21:45:43 -07:00
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: <SANDBOX>
2024-05-05 21:45:43 -07:00
port:
number: 8000