apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: ds-autoscaler
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: StatefulSet
    name: ds
  minReplicas: 2
  maxReplicas: 10
  targetCPUUtilizationPercentage: 40