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

[bitnami/keycloak] - Allow configuring HPA Behaviour for scaleUp / scaleDown #25651

Closed
ashktn opened this issue May 9, 2024 · 1 comment · Fixed by #25681
Closed

[bitnami/keycloak] - Allow configuring HPA Behaviour for scaleUp / scaleDown #25651

ashktn opened this issue May 9, 2024 · 1 comment · Fixed by #25681
Assignees

Comments

@ashktn
Copy link
Contributor

ashktn commented May 9, 2024

Name and Version

bitnami/keycloak 21.1.3

What is the problem this feature will solve?

Hi! I'm new here, happy to give this a try if you accept external contributions!

Problem
Keycloak pods are stateful due to the embedded infinispan cache that requires cache key rebalancing across all live nodes when a pod joins or leaves the cluster. (This process happens on pod startup and shutdown)

The cache keys have a set number of owners (pods) that can survive one node failure with its default config (https://www.keycloak.org/server/caching#_configuring_caches). This means that we need to be able to control the HPA behaviour when scaling down to avoid potential data loss if too many pods are terminated, and scaleUp to avoid excessive cache rebalancing if too many new pods are scheduled at the same time.

What is the feature you are proposing to solve the problem?

Add the ability to configure the scaling behaviour in the HPA spec, similar to the chart below.

https://github.com/codecentric/helm-charts/blob/master/charts%2Fkeycloak%2Ftemplates%2Fhpa.yaml#L24-L25

https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#configurable-scaling-behavior

What alternatives have you considered?

Disabling HPA or have right ranges of min and max pods.

@github-actions github-actions bot added the triage Triage is needed label May 9, 2024
@javsalgar javsalgar changed the title Keycloak - Allow configuring HPA Behaviour for scaleUp / scaleDown [bitnami/keycloak] - Allow configuring HPA Behaviour for scaleUp / scaleDown May 9, 2024
@javsalgar
Copy link
Contributor

Hi!

Thank you so much for the feature request. We do accept external contributions! :D So feel free to submit a PR and the team will review it

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

Successfully merging a pull request may close this issue.

2 participants