apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: rgw-scale
  namespace: rook-ceph
spec:
  scaleTargetRef:
    kind: Deployment
    name: rook-ceph-rgw-{{taskserv.object_storename}}-a
  minReplicaCount: 1
  maxReplicaCount: 5
  triggers:
    - type: prometheus
      metadata:
        serverAddress: http://rook-prometheus.rook-ceph.svc:9090
        metricName: ceph_rgw_put_collector
        query: |
          sum(rate(ceph_rgw_put[2m]))
        threshold: "90"
