Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scaler] Kubernetes Events #165

Open
jeffhollan opened this issue May 9, 2019 · 1 comment
Open

[Scaler] Kubernetes Events #165

jeffhollan opened this issue May 9, 2019 · 1 comment

Comments

@jeffhollan
Copy link
Member

@jeffhollan jeffhollan commented May 9, 2019

Especially interesting for the activation / deactivation

@patnaikshekhar
Copy link
Contributor

@patnaikshekhar patnaikshekhar commented Jul 24, 2019

@jeffhollan @ahmelsayed I've created a pull request for this.

This is what the spec for the scaled object looks like:

spec:
  scaleTargetRef:
    deploymentName: keda-kubernetes-events-scaler-node
  triggers:
  - type: kubernetes-events
    metadata:
      fieldSelector: "metadata.namespace=events-sample,type=Warning" # Optional
      
      # Scale Down Period will check if an event has occured in the 
      # last n seconds and scale down if not
      scaleDownPeriodSeconds: "60" # Optional, Default: 60

      # Number of Events are the number of events that would be set as 
      # the target quantity of the HPA
      numberOfEvents: "3" # Optional, Defaults to 5.

It allows you to filter Kubernetes events based on a field selector. So you can filter by events with a reason such as ImagePullFailure or type such as Warning.

The Scale down period is what is used to check if there have been events in the last n seconds and based on that scale the deployment to zero. Additionally, the number of events parameter is what is used to scale up the pods and is used as the target avg value of the HPA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants