72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: dashboard
|
||
|
|
namespace: customer1
|
||
|
|
labels:
|
||
|
|
app: dashboard
|
||
|
|
app.kubernetes.io/name: dashboard
|
||
|
|
app.kubernetes.io/component: microservice
|
||
|
|
spec:
|
||
|
|
replicas: 2
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: dashboard
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: dashboard
|
||
|
|
app.kubernetes.io/name: dashboard
|
||
|
|
app.kubernetes.io/component: microservice
|
||
|
|
spec:
|
||
|
|
automountServiceAccountToken: false
|
||
|
|
securityContext:
|
||
|
|
runAsNonRoot: true
|
||
|
|
runAsUser: 1000
|
||
|
|
fsGroup: 1000
|
||
|
|
containers:
|
||
|
|
- name: dashboard
|
||
|
|
image: "trading-platform/dashboard:v${VERSION}"
|
||
|
|
ports:
|
||
|
|
- containerPort: 3000
|
||
|
|
protocol: TCP
|
||
|
|
envFrom:
|
||
|
|
- configMapRef:
|
||
|
|
name: trading-platform-config
|
||
|
|
resources:
|
||
|
|
limits:
|
||
|
|
cpu: "500m"
|
||
|
|
memory: 512Mi
|
||
|
|
requests:
|
||
|
|
cpu: "250m"
|
||
|
|
memory: 256Mi
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /health
|
||
|
|
port: 3000
|
||
|
|
initialDelaySeconds: 15
|
||
|
|
periodSeconds: 15
|
||
|
|
timeoutSeconds: 5
|
||
|
|
failureThreshold: 3
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /health
|
||
|
|
port: 3000
|
||
|
|
initialDelaySeconds: 5
|
||
|
|
periodSeconds: 10
|
||
|
|
timeoutSeconds: 5
|
||
|
|
failureThreshold: 3
|
||
|
|
securityContext:
|
||
|
|
allowPrivilegeEscalation: false
|
||
|
|
capabilities:
|
||
|
|
drop:
|
||
|
|
- ALL
|
||
|
|
readOnlyRootFilesystem: true
|
||
|
|
volumeMounts:
|
||
|
|
- name: tmp
|
||
|
|
mountPath: /tmp
|
||
|
|
volumes:
|
||
|
|
- name: tmp
|
||
|
|
emptyDir: {}
|