mirror of
https://github.com/zevenet/kube-nftlb.git
synced 2025-10-27 07:29:25 +00:00
[New feature] Added Prometheus example for metrics
This commit is contained in:
parent
40d1204906
commit
ca6ef7e77c
3
prometheus/Dockerfile
Normal file
3
prometheus/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM prom/prometheus
|
||||
|
||||
COPY prometheus.yml /etc/prometheus
|
||||
36
prometheus/daemonset.yml
Normal file
36
prometheus/daemonset.yml
Normal file
@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: prometheus
|
||||
namespace: default
|
||||
labels:
|
||||
name: prometheus
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: prometheus
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 10%
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: prometheus
|
||||
spec:
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: prometheus
|
||||
image: prometheus-zevenet
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
securityContext:
|
||||
privileged: true
|
||||
10
prometheus/prometheus.yml
Normal file
10
prometheus/prometheus.yml
Normal file
@ -0,0 +1,10 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 15s
|
||||
scrape_configs:
|
||||
- job_name: kube-nftlb
|
||||
scrape_interval: 1s
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost:9195
|
||||
Loading…
Reference in New Issue
Block a user