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

KEDA autoscaling additional requirement #10266

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bjorns163
Copy link

What this PR does

I've been testing the KEDA autoscaling option on my environment and was missing some fields to get this working.
The missing fields, authentication and label filters that were needed I've added.

Which issue(s) this PR fixes or relates to

Fixes #10265

@bjorns163 bjorns163 requested a review from a team as a code owner December 17, 2024 14:51
@CLAassistant
Copy link

CLAassistant commented Dec 17, 2024

CLA assistant check
All committers have signed the CLA.

@chencs
Copy link
Contributor

chencs commented Dec 20, 2024

The CHANGELOG has just been cut to prepare for the next release. Please rebase main and eventually move the CHANGELOG entry added / updated in this PR to the top of the operations/helm/charts/mimir-distributed/CHANGELOG.md document. Thanks!

@bjorns163
Copy link
Author

ok rebased it.

Copy link

@bkimbrough88 bkimbrough88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix the usage of the unsafeSsl flag

{{- $mem_request := dig "requests" "memory" nil .Values.distributor.resources }}
threshold: {{ mulf (include "mimir.siToBytes" (dict "value" $mem_request)) (divf .Values.distributor.kedaAutoscaling.targetMemoryUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume this should actually be unsafeSsl

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }}
threshold: {{ $autoscaling.querySchedulerInflightRequestsThreshold | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

{{- $mem_request := dig "requests" "memory" nil .Values.query_frontend.resources }}
threshold: {{ mulf (include "mimir.siToBytes" (dict "value" $mem_request)) (divf .Values.query_frontend.kedaAutoscaling.targetMemoryUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

threshold: {{ .Values.ruler_querier.kedaAutoscaling.querySchedulerInflightRequestsThreshold | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }}
{{- $cpu_request := dig "requests" "cpu" nil .Values.ruler_query_frontend.resources }}
threshold: {{ mulf (include "mimir.cpuToMilliCPU" (dict "value" $cpu_request)) (divf .Values.ruler_query_frontend.kedaAutoscaling.targetCPUUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }}
{{- $mem_request := dig "requests" "memory" nil .Values.ruler_query_frontend.resources }}
threshold: {{ mulf (include "mimir.siToBytes" (dict "value" $mem_request)) (divf .Values.ruler_query_frontend.kedaAutoscaling.targetMemoryUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

{{- $cpu_request := dig "requests" "cpu" nil .Values.ruler.resources }}
threshold: {{ mulf (include "mimir.cpuToMilliCPU" (dict "value" $cpu_request)) (divf .Values.ruler.kedaAutoscaling.targetCPUUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

{{- $mem_request := dig "requests" "memory" nil .Values.ruler.resources }}
threshold: {{ mulf (include "mimir.siToBytes" (dict "value" $mem_request)) (divf .Values.ruler.kedaAutoscaling.targetMemoryUtilizationPercentage 100) | floor | int64 | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
ignoreNullValues: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsafeSsl: {{ .Values.kedaAutoscaling.ignoreNullValues }}
unsafeSsl: {{ .Values.kedaAutoscaling.unsafeSsl }}

@bkimbrough88
Copy link

@bjorns163 @tacole02 Any chance of this getting merged in soon? I was looking for this the authentication feature

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

Successfully merging this pull request may close these issues.

KEDA autoscaling additional requirements
5 participants