spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.49k stars 357 forks source link

RedisFailover with HorizontalPodAutoscaler #566

Closed TVGSOFT closed 1 year ago

TVGSOFT commented 1 year ago

Expected behaviour

This is basic deployment for redis failover:

apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
  name: redisfailover
spec:
  sentinel:
    replicas: 3
  redis:
    replicas: 3

And I want to use HorizontalPodAutoscaler:

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: redisfailover
spec:
  scaleTargetRef:
    apiVersion: databases.spotahome.com/v1
    kind: Deployment
    name: redisfailover
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 50

Does RedisFailover support this requirement and can you provide an example?

Actual behaviour

Currently, I don't see any example for HorizontalPodAutoscaler with RedisFailover.

Steps to reproduce the behaviour

Describe step by step what you've have done to get to this point

Environment

How are the pieces configured?

Logs

Please, add the debugging logs. In order to be able to gather them, add -debug flag when running the operator.

samof76 commented 1 year ago

@TVGSoft redis-operator does not support this kind of use case. It looks to be not supported in the future too.

But curious to know your use case, as HPA might not relevant for stateful workloads like redis sentinels. I could understand VPA as an option.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.