-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(arc): mount k8s and talos inside #3224
Merged
Merged
Conversation
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
--- HelmRelease: actions-runner-system/gha-runner-scale-set AutoscalingRunnerSet: actions-runner-system/gha-runner-scale-set
+++ HelmRelease: actions-runner-system/gha-runner-scale-set AutoscalingRunnerSet: actions-runner-system/gha-runner-scale-set
@@ -10,25 +10,27 @@
app.kubernetes.io/instance: gha-runner-scale-set
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: gha-rs
actions.github.com/scale-set-name: gha-runner-scale-set
actions.github.com/scale-set-namespace: actions-runner-system
annotations:
- actions.github.com/values-hash: 5439b01fb46b56369620db5189b77443789e731ffdc0c208b557a16e91f131a
+ actions.github.com/values-hash: 3ee793381b4c96e390ccb367d76af0503aa3161e04a6f57e38b4b9cf476e472
actions.github.com/cleanup-github-secret-name: gha-runner-scale-set-gha-rs-github-secret
actions.github.com/cleanup-manager-role-binding: gha-runner-scale-set-gha-rs-manager
actions.github.com/cleanup-manager-role-name: gha-runner-scale-set-gha-rs-manager
actions.github.com/cleanup-no-permission-service-account-name: gha-runner-scale-set-gha-rs-no-permission
spec:
githubConfigUrl: https://github.com/buroa/k8s-gitops
githubConfigSecret: gha-runner-scale-set-gha-rs-github-secret
runnerScaleSetName: gha-runner-scale-set
maxRunners: 3
minRunners: 1
template:
spec:
+ autoMountServiceAccountToken: true
+ serviceAccount: actions-runner
restartPolicy: Never
serviceAccountName: gha-runner-scale-set-gha-rs-no-permission
initContainers:
- name: init-dind-externals
image: ghcr.io/buroa/actions-runner:2.321.0@sha256:08baa1d4489fdbcf85e726568406be481d35cf86da8281d9821a32b78d9301d9
command:
@@ -44,17 +46,24 @@
containers:
- name: runner
command:
- /home/runner/run.sh
image: ghcr.io/buroa/actions-runner:2.321.0@sha256:08baa1d4489fdbcf85e726568406be481d35cf86da8281d9821a32b78d9301d9
env:
+ - name: NODE_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.hostIP
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
- name: RUNNER_WAIT_FOR_DOCKER_IN_SECONDS
value: '120'
volumeMounts:
+ - mountPath: /var/run/secrets/talos.dev
+ name: talos
+ readOnly: true
- name: work
mountPath: /home/runner/_work
- name: dind-sock
mountPath: /var/run
- name: dind
image: docker:dind
@@ -78,7 +87,10 @@
- name: dind-sock
emptyDir: {}
- name: dind-externals
emptyDir: {}
- name: work
emptyDir: {}
+ - name: talos
+ secret:
+ secretName: actions-runner
|
--- kubernetes/apps/system-upgrade/system-upgrade-controller/app Kustomization: flux-system/system-upgrade-controller ServiceAccount: system-upgrade/talos
+++ kubernetes/apps/system-upgrade/system-upgrade-controller/app Kustomization: flux-system/system-upgrade-controller ServiceAccount: system-upgrade/talos
@@ -1,14 +0,0 @@
----
-apiVersion: talos.dev/v1alpha1
-kind: ServiceAccount
-metadata:
- labels:
- app.kubernetes.io/name: system-upgrade-controller
- kustomize.toolkit.fluxcd.io/name: system-upgrade-controller
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: talos
- namespace: system-upgrade
-spec:
- roles:
- - os:admin
-
--- kubernetes/apps/system-upgrade/system-upgrade-controller/app Kustomization: flux-system/system-upgrade-controller ServiceAccount: system-upgrade/system-upgrade
+++ kubernetes/apps/system-upgrade/system-upgrade-controller/app Kustomization: flux-system/system-upgrade-controller ServiceAccount: system-upgrade/system-upgrade
@@ -0,0 +1,14 @@
+---
+apiVersion: talos.dev/v1alpha1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/name: system-upgrade-controller
+ kustomize.toolkit.fluxcd.io/name: system-upgrade-controller
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: system-upgrade
+ namespace: system-upgrade
+spec:
+ roles:
+ - os:admin
+
--- kubernetes/apps/actions-runner-system/actions-runner-controller/app Kustomization: flux-system/actions-runner-controller ServiceAccount: actions-runner-system/actions-runner
+++ kubernetes/apps/actions-runner-system/actions-runner-controller/app Kustomization: flux-system/actions-runner-controller ServiceAccount: actions-runner-system/actions-runner
@@ -0,0 +1,14 @@
+---
+apiVersion: talos.dev/v1alpha1
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/name: actions-runner-controller
+ kustomize.toolkit.fluxcd.io/name: actions-runner-controller
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: actions-runner
+ namespace: actions-runner-system
+spec:
+ roles:
+ - os:admin
+
--- kubernetes/apps/actions-runner-system/actions-runner-controller/app Kustomization: flux-system/actions-runner-controller ClusterRoleBinding: flux-system/actions-runner
+++ kubernetes/apps/actions-runner-system/actions-runner-controller/app Kustomization: flux-system/actions-runner-controller ClusterRoleBinding: flux-system/actions-runner
@@ -0,0 +1,18 @@
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ labels:
+ app.kubernetes.io/name: actions-runner-controller
+ kustomize.toolkit.fluxcd.io/name: actions-runner-controller
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: actions-runner
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cluster-admin
+subjects:
+- kind: ServiceAccount
+ name: actions-runner
+ namespace: actions-runner-system
+
--- kubernetes/apps/system-upgrade/system-upgrade-controller/plans Kustomization: flux-system/system-upgrade-controller-plans Plan: system-upgrade/kubernetes
+++ kubernetes/apps/system-upgrade/system-upgrade-controller/plans Kustomization: flux-system/system-upgrade-controller-plans Plan: system-upgrade/kubernetes
@@ -28,13 +28,13 @@
valueFrom:
fieldRef:
fieldPath: status.hostIP
image: ghcr.io/siderolabs/talosctl:v1.9.1
secrets:
- ignoreUpdates: true
- name: talos
+ name: system-upgrade
path: /var/run/secrets/talos.dev
serviceAccountName: system-upgrade
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
--- kubernetes/apps/system-upgrade/system-upgrade-controller/plans Kustomization: flux-system/system-upgrade-controller-plans Plan: system-upgrade/talos
+++ kubernetes/apps/system-upgrade/system-upgrade-controller/plans Kustomization: flux-system/system-upgrade-controller-plans Plan: system-upgrade/talos
@@ -30,13 +30,13 @@
valueFrom:
fieldRef:
fieldPath: status.hostIP
image: ghcr.io/siderolabs/talosctl:v1.9.1
secrets:
- ignoreUpdates: true
- name: talos
+ name: system-upgrade
path: /var/run/secrets/talos.dev
serviceAccountName: system-upgrade
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
--- kubernetes/apps/actions-runner-system/actions-runner-controller/runner Kustomization: flux-system/actions-runner-controller-runner HelmRelease: actions-runner-system/gha-runner-scale-set
+++ kubernetes/apps/actions-runner-system/actions-runner-controller/runner Kustomization: flux-system/actions-runner-controller-runner HelmRelease: actions-runner-system/gha-runner-scale-set
@@ -36,17 +36,32 @@
maxRunners: 3
minRunners: 1
nameOverride: gha-runner-scale-set
runnerScaleSetName: gha-runner-scale-set
template:
spec:
+ autoMountServiceAccountToken: true
containers:
- command:
- /home/runner/run.sh
+ env:
+ - name: NODE_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.hostIP
image: ghcr.io/buroa/actions-runner:2.321.0@sha256:08baa1d4489fdbcf85e726568406be481d35cf86da8281d9821a32b78d9301d9
name: runner
+ volumeMounts:
+ - mountPath: /var/run/secrets/talos.dev
+ name: talos
+ readOnly: true
+ serviceAccount: actions-runner
+ volumes:
+ - name: talos
+ secret:
+ secretName: actions-runner
valuesFrom:
- kind: Secret
name: actions-runner-controller-secret
targetPath: githubConfigSecret.github_app_id
valuesKey: ACTION_RUNNER_CONTROLLER_GITHUB_APP_ID
- kind: Secret |
3289254
to
5a93302
Compare
buroa
added a commit
that referenced
this pull request
Dec 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/github
Changes made in the github directory
area/kubernetes
Changes made in the kubernetes directory
area/talos
Changes made in the talos directory
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.