Add monitoring PF service
This commit is contained in:
107
k8s/server-deployment.yaml
Normal file
107
k8s/server-deployment.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: monitoring-pf-data
|
||||
namespace: monitoring-pf
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: monitoring-pf-server
|
||||
namespace: monitoring-pf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: monitoring-pf-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: monitoring-pf-server
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 20
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: web
|
||||
image: localhost:30300/admin/monitoring-pf-server:latest
|
||||
command: ["python", "run_web.py"]
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: monitoring-pf-config
|
||||
- secretRef:
|
||||
name: monitoring-pf-secrets
|
||||
volumeMounts:
|
||||
- name: app-data
|
||||
mountPath: /data
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8000
|
||||
periodSeconds: 5
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8000
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8000
|
||||
periodSeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 800m
|
||||
memory: 768Mi
|
||||
- name: bot
|
||||
image: localhost:30300/admin/monitoring-pf-server:latest
|
||||
command: ["python", "-m", "app.bot"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: monitoring-pf-config
|
||||
- secretRef:
|
||||
name: monitoring-pf-secrets
|
||||
volumeMounts:
|
||||
- name: app-data
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 96Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 384Mi
|
||||
- name: scheduler
|
||||
image: localhost:30300/admin/monitoring-pf-server:latest
|
||||
command: ["python", "-m", "app.scheduler"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: monitoring-pf-config
|
||||
- secretRef:
|
||||
name: monitoring-pf-secrets
|
||||
volumeMounts:
|
||||
- name: app-data
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 600m
|
||||
memory: 768Mi
|
||||
volumes:
|
||||
- name: app-data
|
||||
persistentVolumeClaim:
|
||||
claimName: monitoring-pf-data
|
||||
Reference in New Issue
Block a user