Skip to content

Commit

Permalink
refactor: actions-runner-controller namespace (#8647)
Browse files Browse the repository at this point in the history
  • Loading branch information
onedr0p authored Jan 13, 2025
1 parent c45efd1 commit e09fe04
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: actions-runner-controller-auth
name: actions-runner-controller
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: actions-runner-controller-auth-secret
name: actions-runner-controller-secret
template:
engineVersion: v2
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: gha-runner-scale-set-controller
name: &name actions-runner-controller
spec:
interval: 30m
chart:
Expand All @@ -14,8 +14,6 @@ spec:
kind: HelmRepository
name: actions-runner-controller
namespace: flux-system
driftDetection:
mode: enabled
install:
crds: CreateReplace
remediation:
Expand All @@ -27,5 +25,5 @@ spec:
strategy: rollback
retries: 3
values:
fullnameOverride: gha-runner-scale-set-controller
fullnameOverride: *name
replicaCount: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app actions-runner-controller
namespace: flux-system
spec:
targetNamespace: actions-runner-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: external-secrets-stores
path: ./kubernetes/apps/actions-runner-system/actions-runner-controller/app
prune: true
sourceRef:
kind: GitRepository
name: flux-system
wait: false
interval: 30m
timeout: 5m
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app actions-runner-controller-runners
namespace: flux-system
spec:
targetNamespace: actions-runner-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/actions-runner-system/actions-runner-controller/runners
prune: true
sourceRef:
kind: GitRepository
name: flux-system
wait: false
interval: 30m
timeout: 5m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: gha-runner-scale-set
name: &name home-ops-runner
spec:
interval: 30m
chart:
Expand All @@ -14,8 +14,6 @@ spec:
kind: HelmRepository
name: actions-runner-controller
namespace: flux-system
driftDetection:
mode: enabled
install:
remediation:
retries: 3
Expand All @@ -25,26 +23,26 @@ spec:
strategy: rollback
retries: 3
dependsOn:
- name: gha-runner-scale-set-controller
- name: actions-runner-controller
namespace: actions-runner-system
- name: openebs
namespace: openebs-system
valuesFrom:
- targetPath: githubConfigSecret.github_app_id
kind: Secret
name: actions-runner-controller-auth-secret
name: actions-runner-controller-secret
valuesKey: ACTION_RUNNER_CONTROLLER_GITHUB_APP_ID
- targetPath: githubConfigSecret.github_app_installation_id
kind: Secret
name: actions-runner-controller-auth-secret
name: actions-runner-controller-secret
valuesKey: ACTION_RUNNER_CONTROLLER_GITHUB_INSTALLATION_ID
- targetPath: githubConfigSecret.github_app_private_key
kind: Secret
name: actions-runner-controller-auth-secret
name: actions-runner-controller-secret
valuesKey: ACTION_RUNNER_CONTROLLER_GITHUB_PRIVATE_KEY
values:
nameOverride: gha-runner-scale-set
runnerScaleSetName: gha-runner-scale-set
nameOverride: *name
runnerScaleSetName: *name
githubConfigUrl: https://github.com/onedr0p/home-ops
minRunners: 1
maxRunners: 3
Expand All @@ -56,6 +54,9 @@ spec:
resources:
requests:
storage: 25Gi
controllerServiceAccount:
name: actions-runner-controller
namespace: actions-runner-system
template:
spec:
containers:
Expand All @@ -73,11 +74,8 @@ spec:
- mountPath: /var/run/secrets/talos.dev
name: talos
readOnly: true
serviceAccountName: actions-runner
serviceAccountName: *name
volumes:
- name: talos
secret:
secretName: actions-runner
controllerServiceAccount:
name: gha-runner-scale-set-controller
namespace: actions-runner-system
secretName: *name
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./rbac.yaml
- ./helmrelease.yaml
- ./rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: actions-runner
name: home-ops-runner
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: actions-runner
name: home-ops-runner
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: actions-runner
name: home-ops-runner
namespace: actions-runner-system
---
apiVersion: talos.dev/v1alpha1
kind: ServiceAccount
metadata:
name: actions-runner
name: home-ops-runner
spec:
roles:
- os:admin
roles: ["os:admin"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./home-ops

This file was deleted.

20 changes: 0 additions & 20 deletions kubernetes/apps/actions-runner-system/gha-runner-scale-set/ks.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions kubernetes/apps/actions-runner-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ resources:
- ./namespace.yaml
- ../../templates/alerts
# Flux-Kustomizations
- ./gha-runner-scale-set-controller/ks.yaml
- ./gha-runner-scale-set/ks.yaml
- ./actions-runner-controller/ks.yaml
transformers:
- |-
apiVersion: builtin
Expand Down

0 comments on commit e09fe04

Please sign in to comment.