Skip to content

Commit

Permalink
Merge branch 'wolviecb:minReplicas_ExtraManifests' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Nov 22, 2023
2 parents 101c90f + a4f6235 commit e4b686e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/helm/azure-pipelines-agent/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{- if (.Values.secret.create) -}}
Check your Azure DevOps portal at to manage the Azure Pipelines Agent ({{ .Values.pipelines.organizationURL | quote | required "A value for .Values.pipelines.organizationURL is required" }}/_settings/agentpools).
{{- else -}}
Secret creation disabled, remember to create/update the secret {{ include "azure-pipelines-agent.secretName" . | quote }} and that the fields personalAccessToken and organizationURL are required
{{- end -}}

{{- if and (.Values.autoscaling.enabled) (.Capabilities.APIVersions.Has "keda.sh/v1alpha1") -}}
Your cluster is KEDA enabled, your pipelines agents will scale based on your usage. When you won't use them, they will be automatically removed.
Expand Down
4 changes: 4 additions & 0 deletions src/helm/azure-pipelines-agent/templates/extra-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraManifests }}
{{- toYaml . }}
---
{{ end }}
2 changes: 1 addition & 1 deletion src/helm/azure-pipelines-agent/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
spec:
failedJobsHistoryLimit: {{ .Values.pipelines.cleanup.failed | int | required "A value for .Values.pipelines.cleanup.failed is required" }}
maxReplicaCount: {{ .Values.autoscaling.maxReplicas | int | required "A value for .Values.autoscaling.maxReplicas is required" }}
minReplicaCount: 0
minReplicaCount: {{ .Values.autoscaling.minReplicas | int | required "A value for .Values.autoscaling.minReplicas is required" }}
pollingInterval: 15
successfulJobsHistoryLimit: {{ .Values.pipelines.cleanup.successful | int | required "A value for .Values.pipelines.cleanup.successful is required" }}
jobTargetRef:
Expand Down
14 changes: 14 additions & 0 deletions src/helm/azure-pipelines-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ replicaCount: 3

autoscaling:
enabled: true
minReplicas: 0
maxReplicas: 100 # Arbitrary value to avoid misconfiguration; can be enlarged if needed

pipelines:
Expand Down Expand Up @@ -130,3 +131,16 @@ extraVolumeMounts: []
# image: busybox
# command: ["/bin/sh", "-c", "echo Hello World"]
initContainers: []

## Extra manifests to deploy as an array
extraManifests:
[]

# - apiVersion: v1
# kind: Secret
# metadata:
# labels:
# name: azure-pipeline-secret
# data:
# personalAccessToken: "value"
# organizationURL: "value"

0 comments on commit e4b686e

Please sign in to comment.