evryfs/github-actions-runner-operator

No runners deployed after applying sample config

Closed this issue · 13 comments

Following the instructions, I deployed the operator, and subequently deployed the example CRD

Operator is deployed:

NAME                                              READY   STATUS    RESTARTS   AGE
github-actions-runner-operator-57b985d46c-bqpcv   1/1     Running   0          40m

but after deploying the runner, nothing is deployed:

kubectl apply -f ./Chart.yaml                    
githubactionrunner.garo.tietoevry.com/runner-pool created
kubectl get pods -n actions-runner
No resources found in actions-runner namespace.

So I checked out the events, and found this:

kubectl get events -n actions-runner                
LAST SEEN   TYPE      REASON            OBJECT                           MESSAGE
1s          Warning   ProcessingError   githubactionrunner/runner-pool   could not parse private key: Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key

The secret was applied as per the instructions, and when I open the key downloaded from the github app, it's a valid PEM formatted key.

I wonder if it could be related to the indentation of the loading of the key within the operator, similar to this issue here?

Probably, I use the existingSecret approach myself, so I wouldn't notice.
You can fork the chart and play around with this: https://github.com/evryfs/helm-charts/blob/master/charts/github-actions-runner-operator/templates/secret.yaml#L11 in order to try to amend it. Can you do a PR when you found the fix?

GitHub
OpenSourced Helm charts. Contribute to evryfs/helm-charts development by creating an account on GitHub.

Are there instructions on how to use existingSecret? I didn't notice that documented
In parallel, i will take a look at the helm chart to see if there is an issue with the template

this is the "docs" https://github.com/evryfs/helm-charts/blob/master/charts/github-actions-runner-operator/values.yaml#L74 :-D

GitHub
OpenSourced Helm charts. Contribute to evryfs/helm-charts development by creating an account on GitHub.

I think my question is more around are you using a --set command to override that value when executing the helm chart; something such as:
helm install github-actions-runner-operator evryfs-oss/github-actions-runner-operator --namespace github-actions-runner-operator --set githubapp.existingSecret=github-runner-app

I tried that, but got the same issue.

that should work, then it's something broken about how your secret is created, but w/o seeing the layout (be sure to remove the actual secret value) I cannot say

I had to enable two set features to get past this error, so i'll issue a PR to correct that in the documentation.

However, I am encountering a new issue.

The runner still won't run and is showing the following error:

kubectl get events -n actions-runner
LAST SEEN   TYPE      REASON            OBJECT                           MESSAGE
101s        Warning   ProcessingError   githubactionrunner/runner-pool   no installation found for "mygithuborgname"

mygirhuborgname is the name of the org I replaced on line 47 (the value of GH_ORG) and on line 12 for organization:

you also need to define the installation id in the secret, as described in https://github.com/evryfs/github-actions-runner-operator#authentication-modes

Possibly another documentation update to be done:
Installation id doesn't exist in the about section, only App ID and Client ID.

I opted for App ID as the value to add to the secret, but perhaps I should instead try Client ID

image

After installing the app, I now see the installation ID in the url of the app.
After updating the secret,
Sadly, still it's saying "no installation found for mygithuborgname"

I've resolved that issue now.
Will be included in documentation.

I may also include a list of frequently encountered errors and how to solve them.

Sadly now it's complaining about a missing settings-xml configmap, which is also undocumented :(
will investigate this now

Sadly now it's complaining about a missing settings-xml configmap, which is also undocumented :(
will investigate this now

It's an example - if you don't do maven builds and don't need maven configuration - just leave it out.

Pushed changes to the readme and the example to solve the issues that came up in this thread:
#261