97 lines
1.9 KiB
YAML
97 lines
1.9 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: piston
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: piston-sa
|
|
namespace: piston
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: piston-pvc
|
|
namespace: piston
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
storageClassName: nfs-storage
|
|
resources:
|
|
requests:
|
|
storage: 50Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: piston
|
|
namespace: piston
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: piston
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: piston
|
|
spec:
|
|
serviceAccountName: piston-sa
|
|
hostNetwork: false
|
|
hostPID: false
|
|
hostIPC: false
|
|
containers:
|
|
- name: piston
|
|
image: ghcr.io/engineer-man/piston:latest
|
|
securityContext:
|
|
privileged: true
|
|
allowPrivilegeEscalation: true
|
|
runAsNonRoot: false
|
|
ports:
|
|
- containerPort: 2000
|
|
volumeMounts:
|
|
- name: packages
|
|
mountPath: /piston/packages
|
|
resources:
|
|
requests:
|
|
cpu: "500m"
|
|
memory: "1Gi"
|
|
limits:
|
|
cpu: "1"
|
|
memory: "2Gi"
|
|
- name: ui
|
|
image: thitpraphan/piston-web:latest
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: PISTON_API_URL
|
|
value: "http://localhost:2000"
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "250m"
|
|
memory: "256Mi"
|
|
volumes:
|
|
- name: packages
|
|
persistentVolumeClaim:
|
|
claimName: piston-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: piston-service
|
|
namespace: piston
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: piston
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
nodePort: 31003
|