forked from cloudposse/terraform-aws-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upstream and replace
github-actions-runner
with `eks/actions-runner…
…-controller` (cloudposse#485) * replaced github-actions-runner with eks/actions-runner-controller * corrected variable description * moved github-actions-runner to deprecrated, rather than deleted * added README reference * PR comments * added documentation for github tokens * corrected webhook_enabled
- Loading branch information
Showing
34 changed files
with
1,309 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
modules/eks/actions-runner-controller/charts/actions-runner/.helmignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
22 changes: 22 additions & 0 deletions
22
modules/eks/actions-runner-controller/charts/actions-runner/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v2 | ||
name: actions-runner | ||
description: A Helm chart for Kubernetes | ||
|
||
# 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 chart only deploys Resources for actions-runner-controller, so app version does not really apply. | ||
# We use Resource API version instead. | ||
appVersion: "v1alpha1" |
35 changes: 35 additions & 0 deletions
35
...actions-runner-controller/charts/actions-runner/templates/horizontalrunnerautoscaler.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: HorizontalRunnerAutoscaler | ||
metadata: | ||
name: {{ .Values.release_name }} | ||
spec: | ||
# Runners in the targeted RunnerDeployment won't be scaled down | ||
# for 5 minutes instead of the default 10 minutes now | ||
scaleDownDelaySecondsAfterScaleOut: {{ .Values.scale_down_delay_seconds }} | ||
scaleTargetRef: | ||
name: {{ .Values.release_name }} | ||
minReplicas: {{ .Values.min_replicas }} | ||
maxReplicas: {{ .Values.max_replicas }} | ||
{{- if .Values.pull_driven_scaling_enabled }} | ||
metrics: | ||
- type: PercentageRunnersBusy | ||
scaleUpThreshold: {{ .Values.scale_up_threshold | quote }} | ||
scaleDownThreshold: {{ .Values.scale_down_threshold | quote }} | ||
{{- if .Values.scale_up_factor }} | ||
scaleUpFactor: {{ .Values.scale_up_factor | quote }} | ||
{{- else }} | ||
scaleUpAdjustment: {{ .Values.scale_up_adjustment | quote }} | ||
{{- end }} | ||
{{- if .Values.scale_down_factor }} | ||
scaleDownFactor: {{ .Values.scale_down_factor | quote }} | ||
{{- else }} | ||
scaleUpAdjustment: {{ .Values.scale_down_adjustment | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.webhook_driven_scaling_enabled }} | ||
scaleUpTriggers: | ||
- githubEvent: | ||
workflowJob: {} | ||
amount: 1 | ||
duration: "{{ .Values.scale_down_delay_seconds }}s" | ||
{{- end }} |
47 changes: 47 additions & 0 deletions
47
modules/eks/actions-runner-controller/charts/actions-runner/templates/runnerdeployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: RunnerDeployment | ||
metadata: | ||
name: {{ .Values.release_name }} | ||
spec: | ||
# Do not use `replicas` with HorizontalRunnerAutoscaler | ||
# See https://github.com/actions-runner-controller/actions-runner-controller/issues/206#issuecomment-748601907 | ||
# replicas: 1 | ||
template: | ||
spec: | ||
# You could reserve nodes for runners by labeling and tainting nodes with | ||
# node-role.kubernetes.io/actions-runner | ||
# and then adding the following to this RunnerDeployment | ||
# | ||
# nodeSelector: | ||
# node-role.kubernetes.io/actions-runner: "" | ||
# | ||
# tolerations: | ||
# - effect: NoSchedule | ||
# key: node-role.kubernetes.io/actions-runner | ||
# operator: Exists | ||
|
||
{{ if eq .Values.type "organization" }} | ||
organization: {{ .Values.scope }} | ||
{{ end }} | ||
{{ if eq .Values.type "repository" }} | ||
repository: {{ .Values.scope }} | ||
{{ end }} | ||
# You can use labels to create subsets of runners. | ||
# See https://github.com/summerwind/actions-runner-controller#runner-labels | ||
# and https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow | ||
labels: | ||
# It appears that the webhook autoscaler requires the runner deployment | ||
# to explicitly include the "self-hosted" label in order to match the | ||
# workflow_job to it. | ||
- self-hosted | ||
{{- range .Values.labels }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
# dockerdWithinRunnerContainer = false means access to a Docker daemon is provided by a sidecar container. | ||
dockerdWithinRunnerContainer: {{ .Values.dind_enabled }} | ||
image: {{ .Values.image | quote }} | ||
imagePullPolicy: IfNotPresent | ||
serviceAccountName: {{ .Values.service_account_name }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 8 }} | ||
|
Oops, something went wrong.