Skip to content
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

Update README.md #261

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ Depending on whether the GitHub application will operate at a repository or orga
* Organization level
* Self Hosted Runners - Read/Write

Once the GitHub application has been created, obtain the integration ID and download the private key.
Once the GitHub application has been created, go to the "General" tab of the github app. Under the "About" section, note down the `App ID`.
Scroll down to the `Private keys` section and generate and download a private key.
Install the app from the "install App" section of the github app.

A Github application can only be used by injecting environment variables into the Operator deployment. It is recommended that credentials be stored as Kubernetes secrets and then injected into the operator deployment.

Expand All @@ -45,14 +47,6 @@ Create a secret called `github-runner-app` by executing the following command in
kubectl create secret generic github-runner-app --from-literal=GITHUB_APP_INTEGRATION_ID=<app_id> --from-file=GITHUB_APP_PRIVATE_KEY=<private_key>
```

Finally define the following on the operator deployment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be removed as it's describing how it actually works (although helm abstracts that)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is already set in the deployment.yaml if you were to download it manually and apply it.
For the approach mentioned in this section of the readme, this value both doesn't need to be set and cannot be set, without downloading the helm chart and deploying it manually.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying to follow these instructions, I got held up by not being able to find how or where to define that secretRef. I then found that it didn't need to be set at all, so for clarity, it should not be in the readme

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidkarlsen, what should happen to resolve this code review so it can get merged into main?


```shell script
envFrom:
- secretRef:
name: github-runner-app
````

2. Using [Personal Access Tokens (PAT)](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)

Create a Personal Access token with rights at a repository or organization level.
Expand Down Expand Up @@ -113,7 +107,7 @@ Use the following steps to create a namespace and install the operator into the
```shell script
helm repo add evryfs-oss https://evryfs.github.io/helm-charts/
kubectl create namespace github-actions-runner-operator
helm install github-actions-runner-operator evryfs-oss/github-actions-runner-operator --namespace github-actions-runner-operator
helm install github-actions-runner-operator evryfs-oss/github-actions-runner-operator --namespace github-actions-runner-operator --set githubapp.existingSecret=github-runner-app --set githubapp.enabled=true
```
### Manual

Expand All @@ -127,6 +121,23 @@ _Note:_ The [Kustomize](https://kustomize.io/) tool is required
make install
```

Update the values.yaml file depending on how you deploy the secret for the github app:

#### Kubernetes Secret
```shell script
githubapp:
enabled: true
existingSecret: "github-runner-app"
````

#### Manually passing values
```shell script
githubapp:
enabled: true
integrationId: "<App Id>"
privateKey: <key in non-base64 format>
````

2. Deploy the Operator

```shell script
Expand Down
33 changes: 21 additions & 12 deletions config/samples/garo_v1alpha1_githubactionrunner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ spec:
# max number of pods, required
maxRunners: 6
# the github org, required
organization: yourOrg
organization: <Your Github Organization name>
# How often it will reconcile, optional, default 1m
reconciliationPeriod: 1m
# if runner for repo, optional
# repository: "theRepoName"
# tokenRef not required if using helm chart with secret deployed.
tokenRef:
key: GH_TOKEN
name: actions-runner
Expand Down Expand Up @@ -49,10 +50,15 @@ spec:
- name: DOCKER_CERT_PATH
value: /certs/client
- name: GH_ORG
value: yourOrg
value: <Your Github Organization name>
# if runner for repo:
# - name: GH_REPO
# value: theRepoName
# if using maven, optional:
# - mountPath: /home/runner/.m2
# name: mvn-repo
# - mountPath: /home/runner/.m2/settings.xml
# name: settings-xml
envFrom:
- secretRef:
name: runner-pool-regtoken
Expand All @@ -69,10 +75,11 @@ spec:
name: runner-diag
- mountPath: /home/runner/_work
name: runner-work
- mountPath: /home/runner/.m2
IanMoroney marked this conversation as resolved.
Show resolved Hide resolved
name: mvn-repo
- mountPath: /home/runner/.m2/settings.xml
name: settings-xml
# if using maven, optional:
# - mountPath: /home/runner/.m2
# name: mvn-repo
# - mountPath: /home/runner/.m2/settings.xml
# name: settings-xml
- name: docker
env:
- name: DOCKER_TLS_CERTDIR
Expand Down Expand Up @@ -106,13 +113,15 @@ spec:
name: runner-work
- emptyDir: {}
name: runner-diag
- emptyDir: {}
name: mvn-repo
# if using maven, optional:
# - emptyDir: {}
# name: mvn-repo
- emptyDir: {}
name: docker-storage
- emptyDir: {}
name: docker-certs
- configMap:
defaultMode: 420
name: settings-xml
name: settings-xml
# if using maven, optional:
# - configMap:
# defaultMode: 420
# name: settings-xml
# name: settings-xml