infrastructure/k8s/roles/zipline/files/resources/deployment.yaml

51 lines
1.1 KiB
YAML
Raw Normal View History

2023-10-20 14:02:43 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zipline
spec:
selector:
matchLabels:
app.kubernetes.io/name: zipline
replicas: 2
template:
metadata:
labels:
app.kubernetes.io/name: zipline
spec:
containers:
- name: zipline
image: zipline
envFrom:
- secretRef:
name: zipline-base-config
- secretRef:
name: zipline-secret-config
ports:
- containerPort: 3000
protocol: TCP
name: web
volumeMounts:
- mountPath: /tmp
name: temp
resources:
requests:
memory: "256Mi"
cpu: "50m"
limits:
memory: "512Mi"
cpu: "500m"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumes:
- name: temp
emptyDir:
sizeLimit: 1500Mi
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true