89 lines
1.8 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:
2024-05-13 13:22:11 -07:00
- name: projects-volume
2024-05-05 21:45:43 -07:00
emptyDir: {}
containers:
2024-05-13 13:22:11 -07:00
- name: sandbox
2024-05-05 21:45:43 -07:00
image: ishaan1013/sandbox:latest
ports:
- containerPort: 4000
2024-05-13 13:22:11 -07:00
- containerPort: 3000
2024-05-05 21:45:43 -07:00
volumeMounts:
2024-05-13 13:22:11 -07:00
- name: projects-volume
mountPath: /projects
2024-05-05 21:45:43 -07:00
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 13:22:11 -07:00
name: user
port: 3000
targetPort: 3000
2024-05-05 21:45:43 -07:00
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: <SANDBOX>
2024-05-13 13:22:11 -07:00
annotations:
kubernetes.io/ingress.class: "nginx"
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
2024-05-13 14:32:15 -07:00
- host: <SANDBOX>.sandbox.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:
2024-05-13 13:22:11 -07:00
number: 3000