Skip to content

Commit

Permalink
Add self hosted k8s monitoring with eBPF
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihbaltaci committed Sep 1, 2023
1 parent 057566a commit 7f148f2
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/ddosify/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.5
version: 1.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.2.4"
appVersion: "2.0.0"
2 changes: 1 addition & 1 deletion charts/ddosify/templates/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
configMapKeyRef:
key: POSTGRES_PASSWORD
name: env
image: ddosify/selfhosted_backend:1.3.3
image: ddosify/selfhosted_backend:2.0.0
name: backend
imagePullPolicy: IfNotPresent
resources: {}
Expand Down
2 changes: 1 addition & 1 deletion charts/ddosify/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
service: frontend
spec:
containers:
- image: ddosify/selfhosted_frontend:1.2.6
- image: ddosify/selfhosted_frontend:2.0.0
name: frontend
resources: {}
restartPolicy: Always
Expand Down
73 changes: 73 additions & 0 deletions charts/ddosify/templates/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-config
data:
prometheus.yml: |
global:
scrape_interval: 5s
evaluation_interval: 5s
alerting:
alertmanagers:
- static_configs:
- targets: []
scrape_configs:
- job_name: "backend"
metrics_path: '/alaz/metrics/scrape'
static_configs:
- targets: ["backend:8008"]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
labels:
app: prometheus
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
containers:
- name: prometheus
image: prom/prometheus:v2.37.9
args:
- "--config.file=/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
- "--storage.tsdb.retention=10d"
ports:
- containerPort: 9090
volumeMounts:
- name: prometheus-config
mountPath: /prometheus/prometheus.yml
subPath: prometheus.yml
- name: prometheus-storage
mountPath: /prometheus
volumes:
- name: prometheus-config
configMap:
name: prometheus-config
- name: prometheus-storage
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
labels:
app: prometheus
spec:
type: NodePort
ports:
- port: 9090
targetPort: 9090
nodePort: 30090
selector:
app: prometheus

0 comments on commit 7f148f2

Please sign in to comment.