Skip to content

Commit

Permalink
Configure connectivity between keda & custom prometheus stack
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus committed Oct 31, 2023
1 parent 01bbad4 commit 454ebd6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
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).

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

0 comments on commit 454ebd6

Please sign in to comment.