Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 all commits
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 the `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