Skip to content

Commit

Permalink
promeht
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-411 committed Nov 20, 2024
1 parent b26674a commit 891ab89
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
15 changes: 15 additions & 0 deletions k8s/admin-server/scaledobject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: keda-service
namespace: default
spec:
scaleTargetRef:
name: admin-server-deployment.yaml
triggers:
- type: prometheus
metadata:
serverAddress: "http://prometheus-server:9090"
metricName: "http_requests_total"
threshold: "1000"
query: "sum(rate(http_requests_total[5m]))"
43 changes: 15 additions & 28 deletions k8s/prometheus-server/prometheus-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,27 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-server
labels:
app: prometheus-server
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: prometheus-server
app: prometheus
template:
metadata:
labels:
app: prometheus-server
app: prometheus
spec:
containers:
- name: prometheus-server
image: springcommunity/prometheus:latest
ports:
- containerPort: 9090
resources:
limits:
memory: "256Mi"
cpu: "200m"
requests:
memory: "128Mi"
cpu: "100m"
livenessProbe:
httpGet:
path: /api/v1/status/flags
port: 9090
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/v1/status/flags
port: 9090
initialDelaySeconds: 15
periodSeconds: 5
restartPolicy: Always
- name: prometheus
image: prom/prometheus:v2.40.0
ports:
- containerPort: 9090
volumeMounts:
- name: prometheus-config
mountPath: /etc/prometheus
subPath: prometheus.yml
volumes:
- name: prometheus-config
configMap:
name: prometheus-config
10 changes: 3 additions & 7 deletions k8s/prometheus-server/prometheus-server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ apiVersion: v1
kind: Service
metadata:
name: prometheus-server
labels:
app: prometheus-server
namespace: default
spec:
ports:
- name: http
port: 9090
targetPort: 9090
- port: 9090
selector:
app: prometheus-server
type: ClusterIP
app: prometheus
3 changes: 0 additions & 3 deletions test/hola.java

This file was deleted.

0 comments on commit 891ab89

Please sign in to comment.