- Functional control plan
This commit is contained in:
328
k8s/dev/monitoring-services.yaml
Normal file
328
k8s/dev/monitoring-services.yaml
Normal file
@@ -0,0 +1,328 @@
|
||||
# Flower (Celery Monitoring) Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: flower
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: flower
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: flower
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flower
|
||||
spec:
|
||||
containers:
|
||||
- name: flower
|
||||
image: registry.ask-eve-ai-local.com/josakola/flower:latest
|
||||
ports:
|
||||
- containerPort: 5555
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# Flower Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flower-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: flower
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 5555
|
||||
targetPort: 5555
|
||||
nodePort: 30007 # Maps to host port 3007
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: flower
|
||||
|
||||
---
|
||||
# Prometheus PVC
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: prometheus-data-pvc
|
||||
namespace: eveai-dev
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
app: prometheus
|
||||
environment: dev
|
||||
|
||||
---
|
||||
# Prometheus Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: prometheus
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: prometheus
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: prometheus
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: prometheus
|
||||
spec:
|
||||
containers:
|
||||
- name: prometheus
|
||||
image: registry.ask-eve-ai-local.com/josakola/prometheus:latest
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
args:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
volumeMounts:
|
||||
- name: prometheus-data
|
||||
mountPath: /prometheus
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /-/healthy
|
||||
port: 9090
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /-/ready
|
||||
port: 9090
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: prometheus-data
|
||||
persistentVolumeClaim:
|
||||
claimName: prometheus-data-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# Prometheus Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: prometheus-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: prometheus
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9090
|
||||
targetPort: 9090
|
||||
nodePort: 30010 # Maps to host port 3010
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: prometheus
|
||||
|
||||
---
|
||||
# Pushgateway Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pushgateway
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: pushgateway
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pushgateway
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pushgateway
|
||||
spec:
|
||||
containers:
|
||||
- name: pushgateway
|
||||
image: prom/pushgateway:latest
|
||||
ports:
|
||||
- containerPort: 9091
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /-/healthy
|
||||
port: 9091
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /-/ready
|
||||
port: 9091
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# Pushgateway Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pushgateway-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: pushgateway
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9091
|
||||
targetPort: 9091
|
||||
nodePort: 30011 # Maps to host port 3011
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: pushgateway
|
||||
|
||||
---
|
||||
# Grafana PVC
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-data-pvc
|
||||
namespace: eveai-dev
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
environment: dev
|
||||
|
||||
---
|
||||
# Grafana Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: grafana
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
image: registry.ask-eve-ai-local.com/josakola/grafana:latest
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: GF_SECURITY_ADMIN_USER
|
||||
value: "admin"
|
||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
||||
value: "admin"
|
||||
- name: GF_USERS_ALLOW_SIGN_UP
|
||||
value: "false"
|
||||
volumeMounts:
|
||||
- name: grafana-data
|
||||
mountPath: /var/lib/grafana
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: 3000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: 3000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "500m"
|
||||
volumes:
|
||||
- name: grafana-data
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana-data-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# Grafana Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: 3000
|
||||
nodePort: 30012 # Maps to host port 3012
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: grafana
|
||||
Reference in New Issue
Block a user