add a fix for argo workflows hpa

Signed-off-by: ryanpark0203 <108246291+ryanpark0203@users.noreply.github.com>
This commit is contained in:
ryanpark0203 2023-05-08 23:36:02 +10:00
parent 9d10834909
commit 6ddc369300
4 changed files with 8 additions and 3 deletions

View file

@ -3,7 +3,7 @@ appVersion: v3.4.7
name: argo-workflows
description: A Helm chart for Argo Workflows
type: application
version: 0.26.1
version: 0.26.2
icon: https://argoproj.github.io/argo-workflows/assets/logo.png
home: https://github.com/argoproj/argo-helm
sources:

View file

@ -160,7 +160,7 @@ Return the appropriate apiVersion for autoscaling
{{- define "argo-workflows.apiVersion.autoscaling" -}}
{{- if .Values.apiVersionOverrides.autoscaling -}}
{{- print .Values.apiVersionOverrides.autoscaling -}}
{{- else if semverCompare "<1.23-0" (include "argo-cd.kubeVersion" .) -}}
{{- else if semverCompare "<1.23-0" (include "argo-workflows.kubeVersion" .) -}}
{{- print "autoscaling/v2beta1" -}}
{{- else -}}
{{- print "autoscaling/v2" -}}

View file

@ -1,5 +1,5 @@
{{- if and .Values.server.enabled .Values.server.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: {{ include "argo-workflows.apiVersion.autoscaling" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "argo-workflows.server.fullname" . }}

View file

@ -29,6 +29,11 @@ fullnameOverride:
# -- Override the Kubernetes version, which is used to evaluate certain manifests
kubeVersionOverride: ""
# -- Override APIVersions
apiVersionOverrides:
# -- String to override apiVersion of autoscaling rendered by this helm chart
autoscaling: "" # autoscaling/v2
# -- Restrict Argo to operate only in a single namespace (the namespace of the
# Helm release) by apply Roles and RoleBindings instead of the Cluster
# equivalents, and start workflow-controller with the --namespaced flag. Use it