From 6c55e693e3ed06d8fc3d08dd69d143654390f7d0 Mon Sep 17 00:00:00 2001 From: marcel-dempers Date: Wed, 21 Feb 2024 16:04:06 +1100 Subject: [PATCH] update values and instructions for runner scaleset --- github/actions/kubernetes/README.md | 21 +++++++++++++++---- .../{values.yaml => scaleset-values.yaml} | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) rename github/actions/kubernetes/{values.yaml => scaleset-values.yaml} (77%) diff --git a/github/actions/kubernetes/README.md b/github/actions/kubernetes/README.md index 2a5b3afe..40587400 100644 --- a/github/actions/kubernetes/README.md +++ b/github/actions/kubernetes/README.md @@ -82,16 +82,13 @@ Create a new [Github App](https://docs.github.com/en/apps/using-github-apps/inst Once we have created our Github App, we need to configure its authentication by creating a kubernetes secret with the authentication details of the app.
-When we have a `.pem` file , we can convert it to a single line: - -`awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' yourfile.pem` ``` kubectl create secret generic github-app-secret \ --namespace=github \ --from-literal=github_app_id=xxxxx \ --from-literal=github_app_installation_id=xxxxx \ - --from-literal=github_app_private_key='-----BEGIN RSA PRIVATE KEY-----xxxxxx-----END RSA PRIVATE KEY-----' + --from-file=github_app_private_key='github.pem' ``` Now we can upgrade our chart to apply the authentication changes @@ -130,4 +127,20 @@ We can also set our runner name using the values file using the [advanced config ``` runnerScaleSetName: "marcels-runner" +``` + +Deploy the Github actions runner scaleset + +``` +INSTALLATION_NAME="arc-runner-set" +NAMESPACE="github" +GITHUB_CONFIG_URL="https://github.com/marcel-dempers/docker-development-youtube-series" + +helm install "${INSTALLATION_NAME}" \ + --namespace "${NAMESPACE}" \ + --create-namespace \ + --values scaleset-values.yaml \ + --set githubConfigUrl="${GITHUB_CONFIG_URL}" \ + oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set + ``` \ No newline at end of file diff --git a/github/actions/kubernetes/values.yaml b/github/actions/kubernetes/scaleset-values.yaml similarity index 77% rename from github/actions/kubernetes/values.yaml rename to github/actions/kubernetes/scaleset-values.yaml index 7338a530..dc8134dc 100644 --- a/github/actions/kubernetes/values.yaml +++ b/github/actions/kubernetes/scaleset-values.yaml @@ -4,6 +4,6 @@ template: spec: containers: - name: runner - image: "custom-registry.io/actions-runner:latest" + image: "ghcr.io/actions/actions-runner:latest" imagePullPolicy: Always command: ["/home/runner/run.sh"] \ No newline at end of file