Added piston template
This commit is contained in:
82
kubernetes-templates/piston.yml
Normal file
82
kubernetes-templates/piston.yml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
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: engineerman/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"
|
||||||
|
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: 2000
|
||||||
|
nodePort: 31003
|
||||||
Reference in New Issue
Block a user