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

Min replicas extra manifests #102

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/helm/azure-pipelines-agent/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{{- if (.Values.secret.create) -}}
clemlesne marked this conversation as resolved.
Show resolved Hide resolved
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 -}}
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).
{{- 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/extraManifests.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
13 changes: 13 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,15 @@ 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"