Skip to content

Commit

Permalink
Merge pull request #131 from holaplex/mpw/runners-chart
Browse files Browse the repository at this point in the history
a chart to deploy github runners
  • Loading branch information
mpwsh authored Jul 28, 2023
2 parents b4042b0 + c04599e commit ecddffe
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
30 changes: 30 additions & 0 deletions charts/github-runners/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v2
name: github-runners
description: A Helm chart to create GitHub Actions runners
maintainers:
- name: Holaplex Engineering
email: [email protected]

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.1.0
sources:
- https://github.com/holaplex/helm-charts
43 changes: 43 additions & 0 deletions charts/github-runners/templates/runner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- $organizationName := .Values.organization -}}
{{- range .Values.runners }}
{{- $runner := . -}}
{{- range .architectures }}
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: {{ $runner.name }}-{{ . }}
namespace: actions-runner-system
spec:
template:
spec:
labels:
- {{ . }}
{{- if eq . "amd64" }}
- self-hosted
{{- end }}
nodeSelector:
kubernetes.io/arch: {{ . }}
tolerations:
- key: "kubernetes.io/arch"
operator: "Equal"
value: {{ . }}
effect: "NoSchedule"
repository: {{ $organizationName }}/{{ $runner.name }}
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: {{ $runner.name }}-{{ . }}
spec:
scaleTargetRef:
kind: RunnerDeployment
name: {{ $runner.name }}-{{ . }}
minReplicas: {{ $runner.replicas.min }}
maxReplicas: {{ $runner.replicas.max }}
metrics:
- type: TotalNumberOfQueuedAndInProgressWorkflowRuns
repositoryNames:
- {{ $organizationName }}/{{ $runner.name }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/github-runners/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
organization: holaplex
runners: []
# - name: hub-nfts-polygon
# repository: hub-nfts-polygon
# architectures:
# - arm64
# - amd64
# replicas:
# min: 0
# max: 5

0 comments on commit ecddffe

Please sign in to comment.