Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Configure connectivity between keda & custom prometheus stack #276

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scale-to-zero-with-keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Make sure Istio sidecar injection is enabled in the target Namespace:
kubectl label namespace default istio-injection=enabled
```

Edit `k8s-resources/scalable-worker-fn.yml` and `k8s-resources/peer-authentication.yaml` files to fill in the namespace value (namespace where prometheus was deployed).
kwiatekus marked this conversation as resolved.
Show resolved Hide resolved

Apply the example resources from `./k8s-resources` directory:
```bash
kubectl apply -f ./k8s-resources
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: {prometheus-namespace}
spec:
mtls:
mode: PERMISSIVE
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
triggers:
- type: prometheus
metadata:
serverAddress: http://prometheus-operated.kyma-system.svc.cluster.local:9090
serverAddress: http://prometheus-operated.{prometheus-namespace}.svc.cluster.local:9090
query: sum(rate(istio_requests_total{destination_service="scalable-worker-fn.default.svc.cluster.local",reporter="source"}[1m]))
threshold: '2'

Expand Down