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

[loki-distributed] loki-querier architecture does not allow KEDA ScaledObject #2860

Closed
siryur opened this issue Dec 19, 2023 · 1 comment
Closed

Comments

@siryur
Copy link
Contributor

siryur commented Dec 19, 2023

Chart version: loki-distributed v0.77.0

As the official grafana documentation suggests:

We recommend using Kubernetes Event-Driven Autoscaling (KEDA) to configure autoscaling based on Prometheus metrics. Refer to Deploying KEDA to learn more about setting up KEDA in your Kubernetes cluster.

The problem here is that whenever I want to implement a ScaledObject on my side,
I don't have a way to not set replicas nor deploy the default Kubernetes HPA.

See:

{{- if not .Values.querier.autoscaling.enabled }}
replicas: {{ .Values.querier.replicas }}
{{- end }}

and

{{- if and .Values.indexGateway.enabled .Values.querier.autoscaling.enabled }}


So, in a case where I use this chart as a dependency of my (self-made) chart with:

dependencies:
- name: loki-distributed
  repository: https://grafana.github.io/helm-charts
  version: 0.77.0

And then I build a KEDA ScaledObject, I'm stuck because the chart will always deploy
a Deployment with spec.replicas or the kind: HorizontalPodAutoscaler object:

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: {{ include "loki.querierFullname" $lokiContext }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "loki.querierLabels" $lokiContext | nindent 4 }}
spec:
# (...)

I suggest one of the following:

  • We introduce the KEDA ScaledObject implementation on the chart
  • We introduce an option to not set neither of those objects
@siryur
Copy link
Contributor Author

siryur commented Dec 19, 2023

Duplicated: #2126

@siryur siryur closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant