noobaa / noobaa-operator

Operator for NooBaa - object data service for hybrid and multi cloud environments :cloud: :wrench:
https://www.noobaa.io
Apache License 2.0
103 stars 101 forks source link

How to get nooba-endpoints with multiple replicas with HPA or without HPA? #1404

Open rijesh-purayil opened 3 months ago

rijesh-purayil commented 3 months ago

Environment : Minikube Version : noobaa 5.15.2

We have a use case to test Noobaa-endpoint with multiple replicas. We tried with autoscaler: hpav2 along with minCount(2) and maxCount(4) in the Noobaa spec definition. We can't see that configuration resulting to multiple pods defined in minCount(2).

Nobba spec definition:-

spec:
  autoscaler:
    autoscalerType: hpav2
    prometheusNamespace: noobaa
  cleanupPolicy: {}
  dbImage: quay.io/sclorg/postgresql-15-c9s
  dbType: postgres
  endpoints:
    maxCount: 4
    minCount: 2
  image: noobaa/noobaa-core:master-20230920
  loadBalancerSourceSubnets: {}
  security:
    kms: {}

We can see the following in the operator log.

time="2024-08-02T10:55:39Z" level=info msg="ReconcileObject: Done - updated Deployment noobaa-endpoint " sys=noobaa/noobaa
time="2024-08-02T10:55:39Z" level=info msg="Configured autoscaler types is hpav2" func=reconcileAutoscaler sys=noobaa/noobaa
time="2024-08-02T10:55:39Z" level=debug msg="HPAV2 autoscaler type is Resource, skipping HPAV2 resource creation" sys=noobaa/noobaa
time="2024-08-02T10:55:39Z" level=info msg="ReconcileObject: Done - unchanged HorizontalPodAutoscaler noobaa-hpav2 " sys=noobaa/noobaa

How to get nooba-endpoints with multiple replicas with HPA or without HPA? I guess the HPA is not set by default here, the minCount and maxCount in the noobaa CR is not obeyed by the noobaa-operator 5.15.2.

Here at https://github.com/noobaa/noobaa-operator/blob/master/deploy/crds/noobaa.io_noobaas.yaml#L965-L970 ; it say hpav2 is default, but then seems like its not.

Even after adding autoscaler definition, looks like it require Prometheus, we don't know why and looking for it to work without mentioning prometheusNamespace.

Please help.