mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
⚙️ fix: Dynamic HPA API Version Selection for K8s Compatibility (#9320)
Co-authored-by: Pranshu Mahajan <pranshu.mahajan#foxtel.com.au>
This commit is contained in:
parent
75dd6fb28b
commit
cadfe14abe
2 changed files with 14 additions and 1 deletions
|
@ -63,3 +63,16 @@ Create the name of the service account to use
|
||||||
{{- default "default" .Values.serviceAccount.name }}
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Define apiVersion of HorizontalPodAutoscaler
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat.hpa.apiVersion" -}}
|
||||||
|
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" -}}
|
||||||
|
{{- print "autoscaling/v2" -}}
|
||||||
|
{{- else if .Capabilities.APIVersions.Has "autoscaling/v2beta2" -}}
|
||||||
|
{{- print "autoscaling/v2beta2" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- print "autoscaling/v2beta1" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.autoscaling.enabled }}
|
{{- if .Values.autoscaling.enabled }}
|
||||||
apiVersion: autoscaling/v2beta1
|
apiVersion: {{ include "librechat.hpa.apiVersion" $ }}
|
||||||
kind: HorizontalPodAutoscaler
|
kind: HorizontalPodAutoscaler
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "librechat.fullname" $ }}
|
name: {{ include "librechat.fullname" $ }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue