diff --git a/charts/argo-rollouts/templates/_helpers.tpl b/charts/argo-rollouts/templates/_helpers.tpl index bfacf4e2..46ebaea5 100644 --- a/charts/argo-rollouts/templates/_helpers.tpl +++ b/charts/argo-rollouts/templates/_helpers.tpl @@ -109,11 +109,3 @@ Return the appropriate apiVersion for pod disruption budget {{- print "policy/v1" -}} {{- end -}} {{- end -}} - -{{/* -Expand the namespace of the release. -Allows overriding it for multi-namespace deployments in combined charts. -*/}} -{{- define "argo-rollouts.namespace" -}} -{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} -{{- end }} diff --git a/charts/argo-rollouts/templates/controller/hpa.yaml b/charts/argo-rollouts/templates/controller/hpa.yaml index 9924754d..1060a42b 100644 --- a/charts/argo-rollouts/templates/controller/hpa.yaml +++ b/charts/argo-rollouts/templates/controller/hpa.yaml @@ -3,9 +3,10 @@ apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "argo-rollouts.fullname" . }} - namespace: {{ include "argo-rollouts.namespace" . }} + namespace: {{ .Release.Namespace | quote }} labels: - {{- include "argo-rollouts.labels" (dict "context" .) | nindent 4 }} + app.kubernetes.io/component: {{ .Values.controller.component }} + {{- include "argo-rollouts.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index 12b5eb2e..724c6b86 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -61,12 +61,36 @@ controller: tolerations: [] # -- Assign custom [affinity] rules to the deployment affinity: {} + # -- Argo Rollouts controller HPA autoscaling: - enabled: true - minReplicas: 1 - maxReplicas: 2 + # -- Enable Horizontal Pod Autoscaler ([HPA]) for the Argo Rollouts controller + enabled: false + # -- Minimum number of replicas for the Argo Rollouts controller [HPA] + minReplicas: 2 + # -- Maximum number of replicas for the Argo Rollouts controller [HPA] + maxReplicas: 10 + # -- Average CPU utilization percentage for the Argo Rollouts controller [HPA] targetCPUUtilizationPercentage: 80 + # -- Average memory utilization percentage for the Argo Rollouts controller [HPA] targetMemoryUtilizationPercentage: 80 + # -- Configures the scaling behavior of the target in both Up and Down directions. + behavior: {} + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 2 + # periodSeconds: 60 + # -- Configures custom HPA metrics for the Argo Rollouts controller + # Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ + metrics: [] + logging: # -- Set the logging level (one of: `debug`, `info`, `warn`, `error`) level: info