Skip to content

Commit

Permalink
fix: minor fixes in github-actions-runners (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetOps authored Apr 14, 2022
1 parent 84d2024 commit 2f05012
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/github-actions-runners/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: github-actions-runners
description: A Helm chart for provisioning Github Actions runners
type: application
version: 0.2.0
version: 0.2.1
maintainers:
- name: SweetOps
2 changes: 2 additions & 0 deletions charts/github-actions-runners/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{{- $maxReplicas := $autoscaling.maxReplicas | default $.Values.global.autoscaling.maxReplicas }}
{{- $scaleUpTriggers := $autoscaling.scaleUpTriggers | default $.Values.global.autoscaling.scaleUpTriggers }}
{{- $metrics := $autoscaling.metrics | default $.Values.global.autoscaling.metrics }}
{{- $scaleDownDelaySecondsAfterScaleOut := $autoscaling.scaleDownDelaySecondsAfterScaleOut | default $.Values.global.autoscaling.scaleDownDelaySecondsAfterScaleOut }}
{{- if $autoscalingEnabled }}
kind: HorizontalRunnerAutoscaler
apiVersion: actions.summerwind.dev/v1alpha1
Expand All @@ -18,6 +19,7 @@ metadata:
github-actions-runner: {{ .name }}
{{- include "github-actions-runners.labels" $ | nindent 4 }}
spec:
scaleDownDelaySecondsAfterScaleOut: {{ $scaleDownDelaySecondsAfterScaleOut }}
minReplicas: {{ $minReplicas }}
maxReplicas: {{ $maxReplicas }}
scaleTargetRef:
Expand Down
4 changes: 4 additions & 0 deletions charts/github-actions-runners/templates/runnerdeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
{{- $repository := $imageSpec.repository | default $.Values.global.image.repository }}
{{- $tag := $imageSpec.tag | default $.Values.global.image.tag }}
{{- $pullPolicy := $imageSpec.pullPolicy | default $.Values.global.image.pullPolicy }}
{{- $autoscaling := .autoscaling | default dict }}
{{- $autoscalingEnabled := $autoscaling.enabled | default false }}
kind: RunnerDeployment
apiVersion: actions.summerwind.dev/v1alpha1
metadata:
Expand All @@ -15,7 +17,9 @@ metadata:
github-actions-runner: {{ .name }}
{{- include "github-actions-runners.labels" $ | nindent 4 }}
spec:
{{- if not $autoscalingEnabled }}
replicas: {{ .replicaCount | default $.Values.global.replicaCount }}
{{- end }}
template:
metadata:
{{- with (default $.Values.global.podAnnotations .podAnnotations) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- range .Values.runnerDeployments }}
---
{{- $enabled := printf "%t" .enabled }}
{{- if regexMatch "nil" $enabled }}{{- $enabled = "true" }}{{- end }}
{{- if (eq $enabled "true") }}
{{- $serviceAccount := .serviceAccount | default dict }}
{{- $create := $serviceAccount.create | default $.Values.global.serviceAccount.create }}
{{- $annotations := $serviceAccount.annotations | default $.Values.global.serviceAccount.annotations }}
{{- if $create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
1 change: 1 addition & 0 deletions charts/github-actions-runners/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ global:
maxReplicas: 3
metrics: []
scaleUpTriggers: []
scaleDownDelaySecondsAfterScaleOut: 300


runnerDeployments:
Expand Down

0 comments on commit 2f05012

Please sign in to comment.