Skip to content

Commit

Permalink
feat(actions-runner-controller): migrate to new charts (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyriis authored Sep 19, 2023
1 parent e4db5c9 commit 27798bd
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ repos:
rev: v0.3.0
hooks:
- id: check-flux-helm-values
exclude: (kubernetes/apps/home-automation/home-assistant/app/patches/db-init.yaml)
exclude: |
(?x)^(
kubernetes/apps/home-automation/home-assistant/app/patches/db-init.yaml|
kubernetes/apps/github/actions-runner-controller/.+/helm-release.yaml
)$()
38 changes: 37 additions & 1 deletion kubernetes/apps/github/actions-runner-controller/flux-sync.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
# ---
# apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
# kind: Kustomization
# metadata:
# name: apps-actions-runner-controller
# namespace: flux-system
# labels:
# substitution.flux.home.arpa/enabled: "true"
# spec:
# interval: 10m
# path: ./kubernetes/apps/github/actions-runner-controller/app
# prune: true
# sourceRef:
# kind: GitRepository
# name: home-ops
# wait: true
# ---
# apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
# kind: Kustomization
# metadata:
# name: apps-actions-runner-controller-runners
# namespace: flux-system
# labels:
# substitution.flux.home.arpa/enabled: "true"
# spec:
# dependsOn:
# - name: apps-actions-runner-controller
# interval: 10m
# path: ./kubernetes/apps/github/actions-runner-controller/runners
# prune: true
# sourceRef:
# kind: GitRepository
# name: home-ops
# wait: true
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1beta2.json
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
Expand All @@ -8,13 +43,14 @@ metadata:
substitution.flux.home.arpa/enabled: "true"
spec:
interval: 10m
path: ./kubernetes/apps/github/actions-runner-controller/app
path: ./kubernetes/apps/github/actions-runner-controller/operator
prune: true
sourceRef:
kind: GitRepository
name: home-ops
wait: true
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1beta2.json
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: actions-runner-controller
spec:
interval: 30m
chart:
spec:
chart: actions-runner-controller-charts/gha-runner-scale-set-controller
version: 0.6.0
sourceRef:
kind: HelmRepository
name: actions-runner-controller-charts
namespace: flux-system
interval: 30m

install:
crds: CreateReplace
upgrade:
crds: CreateReplace

values:
fullnameOverride: gha-runner-scale-set-controller
# resources:
# requests:
# memory: 64Mi
# limits:
# memory: 128Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: github
resources:
- ./helm-release.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# ---
# apiVersion: kustomize.config.k8s.io/v1beta1
# kind: Kustomization
# namespace: github
# resources:
# - organization.sops.yaml
# - tyriis.sops.yaml
# - jazzlyn.sops.yaml
# - organization-runner-deployment.yaml
# - tyriis-runner-deployment.yaml
# - jazzlyn-runner-deployment.yaml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: github
resources:
- organization.sops.yaml
- tyriis.sops.yaml
- jazzlyn.sops.yaml
- organization-runner-deployment.yaml
- tyriis-runner-deployment.yaml
- jazzlyn-runner-deployment.yaml
- tyriis/secrets.sops.yaml
- tyriis/home-ops/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: tyriis-home-ops
spec:
interval: 30m
chart:
spec:
chart: actions-runner-controller-charts/gha-runner-scale-set
version: 0.6.0
sourceRef:
kind: HelmRepository
name: actions-runner-controller-charts
namespace: flux-system
interval: 30m

values:
runnerScaleSetName: arc-runner-set-home-ops

githubConfigUrl: https://github.com/tyriis/home-ops

minRunners: 0
maxRunners: 3

containerMode:
type: "dind"

template:
spec:
containers:
- name: runner
image: ghcr.io/actions/actions-runner:2.309.0@sha256:689735691f58a631efd20dbf6a0c841ea182d69a38ca0e3984362a14a853d2ce

valuesFrom:
- kind: Secret
name: tyriis-runners
valuesKey: github_app_id
targetPath: githubConfigSecret.github_app_id
- kind: Secret
name: tyriis-runners
valuesKey: github_app_installation_id
targetPath: githubConfigSecret.github_app_installation_id
- kind: Secret
name: tyriis-runners
valuesKey: github_app_private_key
targetPath: githubConfigSecret.github_app_private_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yamllint disable
apiVersion: v1
metadata:
name: tyriis-runners
kind: Secret
data:
github_app_id: ENC[AES256_GCM,data:YKJsljSgaog=,iv:6kpxRt89bGLGV8UVAuzRH/HI1rzXFb9oVHT10PcvbLg=,tag:TtWPyb+QJq8b5MhS2793Sw==,type:str]
github_app_installation_id: ENC[AES256_GCM,data:K5ir/GRPKfYKO5Hp,iv:2ViLvxjjtTcc7INkR2TDGC0mzcEFCjFmLc/IZdFZh+4=,tag:jIowEIhbBT2qzLc1J/lQLA==,type:str]
github_app_private_key: ENC[AES256_GCM,data:u/4Bz8vQTxYMbOnIM473tZnOWGFHAWYCjOUMoMJ4mV58WeErfslk22BAgflSfQm4x1kr/0rm4D4PldMepIji56LLpyu4SzRKmITakUAegbj9k/r0DaJ3NTqwi8Vrt/lruNYfeywxizT/BCycwWKe/NbTyIs1/wuFO7kqBC+0LGMFxg9TjCKoEmoJrUN4rHsS/vO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iZaMNOK/2WIVvltaX3ZOqny/qJQqdVVFCWeQzt3utEgx1KZCcb0WokBEuLegGYnPh/ZB0CeAijXBrg0cPO1Hpy6/HtuT09mjJNzc2eysv34lFb6sy4cbjtIqlPnOfF2xiRblrn5WWKgyXkAWJY3CDiGOUjD3I4r0OZrO9edCoAU2wtK7wwJM+7RneakTvD30Z7V/7wY4Bhn4Nxd3XuvS4c6O9FnE1S6POklotqkjdnridEl/mkR/z5o1/CfFpbtTpU0+Jgt4J04POum8zmEchdc6ynT4UYIWixEOvNyO85Bl/kH7BCAyFacuEIdoAukGiKz2xQOYPlU6Ee+HTQ0uN5BLRu3/zOiVJf+n8eGwQMyEut8sGjMowFvHfBJ+N3s37Gds7qY7Rsklf2QRbAQvfFLoxJYQLfb3RqKOyRrk9IY6IW1piNuDYb0Fd1l+HZIvCSXXKsJYyD9T1VEkJfqSoYbP5YHk1GEp7q5viQX0OR55a4kqUeeENP27K2TcXH9khEz64l00S4M0HbFSXlA4FYKkFcCLTh3XN5xOUWTd+1jwE1EnLR17iHBnGOFKqb7MNcz4OkNDEeGNszBsyDgUde8nSuftVrQeGJ6MaWs4=,iv:O1UOHQDGZY6DZnCb5RI6mrLWFbTI8Z+PoQ4PR5J2bSI=,tag:PGbUOcxC659p81FKC7Orxw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age16zqeqx5y6ay3flwz0d06rn83yjv9ckys3j8tpkysf9v6295fhc6sf4r0uj
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzYjdZeVptaDlPZW9idmtP
UkRGdmxyb0REM2s4dnZVSERQNFFSRHlqVkcwClJlZHVhQUVnUm16QVloazMyUUFx
Q24vakF5RUEvMTExZ0lPa1RXblFEV3cKLS0tIFNMcGx3NzRQT0U4MTZER0FQUzh3
SThDODl4ZFFMMUlxM3BneWlrNDdjdUUKm16agevW+HLV4al0q2m5W/SyS84E5SXh
QfWlkG1byRaLRQ+tMeTuCN0tk2A2asmSPygQ1IKo4AO9kMirDEjQ6w==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-09-19T20:08:23Z"
mac: ENC[AES256_GCM,data:GVXx4Kkg58RowzXQfH6Lni2Tp2xsbqrP2j7ggWdyTPvcFZqQPzanSNLWUELQqyVlmGq7n+ZwNUeZbvFZ/eAVo+cB2MxS/9SuBZXE5dbsQVaJT2t00N3witBdXDHCnFwzYCCbbimg8IScvoeMuU2n9ooWCK4LsXg0fU/b6/qDA3M=,iv:WdUiCwKvxFv1p6UxFCS/7HKnwZpSbaV6DwgZN1TiVGg=,tag:PKhdoeix7w8CpOBEAsGR3g==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.8.0
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: actions-runner-controller-charts
namespace: flux-system
spec:
interval: 15m
url: https://actions-runner-controller.github.io/actions-runner-controller
type: oci
interval: 30m
url: oci://ghcr.io/actions
timeout: 3m

0 comments on commit 27798bd

Please sign in to comment.