This message was deleted.
# fleet
a
This message was deleted.
c
Hi Damien. That's clearly interesting, and I am interested in what you might be able to achieve with Keda combined with Fleet.
w
Hi Paul, We use Fleet to deploy our user's applications helm charts. We try to integrate keda for several use cases (run app only from 08:00am to 6:00pm or scale app based on Kafka topics). To do this, we have the "ScaledObject" CR in the helm chart.
i
Hi Damien, I'm not sure if it is related to https://github.com/rancher/fleet/issues/937 as this is only for jobs. It looks like this problem happens with the CR
ScaledObject
Can you provide an example of an
ScaledObject
that stays in that state, please?
w
Hi, for sure :
Copy code
apiVersion: <http://keda.sh/v1alpha1|keda.sh/v1alpha1>
kind: ScaledObject
metadata:
  name: ebad-back
spec:
  minReplicaCount: 0
  maxReplicaCount: 2
  scaleTargetRef:
    name: {{ .Values.backend.name }}-backend
  triggers:
    - type: cron
      metadata:
        timezone: Europe/Paris
        start: 29 14 * * *
        end: 35 14 * * *
        desiredReplicas: "2"
πŸ‘€ 1
i
I installed Keda, then applied this ScaledObject but it looks like I'm missing more things. I'll try to reproduce it tomorrow with the examples from https://github.com/turbaszek/keda-example
πŸ‘ 1
Hi Damien, I managed to reproduce the issue. The problem is that the ScaledObject resource has the active condition set to false
Copy code
status:
  conditions:
  - message: ScaledObject is defined correctly and is ready for scaling
    reason: ScaledObjectReady
    status: "True"
    type: Ready
  - message: Scaling is not performed because triggers are not active
    reason: ScalerNotActive
    status: "False"
    type: Active
  - status: Unknown
    type: Fallback
If there is an active condition that is false, the fleet-agent set this BundleDeployment to have an activating state
Copy code
- apiVersion: <http://keda.sh/v1alpha1|keda.sh/v1alpha1>
    kind: ScaledObject
    name: rabbitmq-consumer
    namespace: default
    summary:
      error: true
      message:
      - Scaling is not performed because triggers are not active
      - Resource is Ready
      state: activating
I don't have much experience with Keda, but if there is any way to set the
ScaledObject
resource to have an Active equals to true it should fix the problem. If not, I would suggest to create an issue since it looks like fleet always mark the Bundle as error is Active is false even if Ready is true. However, that might be the expected behavior for other kubernetes resources. Therefore I'm not sure if this can be changed
πŸ™Œ 1
w
Hi Raul, Thank you for your analyse. Yes, this is the behaviour of Keda (I have the same behaviour with a Cis ClusterScan which have a failure). So, I'm going to create an issue on Fleet project. Regards
πŸ‘ 1
c
@important-oxygen-86641 The problem seems to happen also for CIS Scans that did complete successfully but have a rule that is not satisfied. For example, the scan shown in screenshots should not be in Error because the scan is actually completed, but a couple of rules are not satisfied. Fleet should only consider `Created`equals
true
πŸ‘ 1
i
Probably the ClusterScan CR has other conditions not satisfied
c
There is a screenshot of that above. The possible culprits are
Pending
=
true
or
Alerted
=
false
.
n
@wide-magician-63081 Did you find any way to work around this in the mean time?
Link to the corresponding issue: https://github.com/rancher/fleet/issues/1386
w
Hi @nutritious-orange-38459, No I didn't find a work around.
335 Views