actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.76k stars 1.12k forks source link

Github App Authentication not working: Not found 404 #3615

Closed Smana closed 5 months ago

Smana commented 5 months ago

Checks

Controller Version

0.9.2

Deployment Method

Helm

Checks

To Reproduce

1. Install the controller
2. Define an AutoscalingRunnerSet
3. Checking the controller's log. In the gist below

Actually everything is defined [here](https://github.com/Smana/demo-cloud-native-ref/tree/feat_github_arc/tooling/base/arc)

Describe the bug

Hey everyone,

Even though I folowed the documentation related to the authentication, I'm not able to get the controller working properly. It seems to be permissions issues but I'm not sure.

Could you please give me a hand?

Thank you.

Describe the expected behavior

A runner should be created, I should not have these authentication error logs.

Additional Context

here

Controller values:

    resources:
      limits:
        memory: 128Mi
      requests:
        cpu: 100m
        memory: 128Mi
    flags:
      logLevel: "debug"
      logFormat: "json"

Scaler-set values:

    runnerGroup: "default"
    githubConfigUrl: "https://github.com/Smana"
    githubConfigSecret: default-gha-runner-scale-set
    maxRunners: 5

    containerMode:
      type: "kubernetes"
      kubernetesModeWorkVolumeClaim:
        accessModes: ["ReadWriteOnce"]
        storageClassName: "gp3"
        resources:
          requests:
            storage: 10Gi

Controller Logs

https://gist.github.com/Smana/70257128cf9892df7537f787b679c445

Runner Pod Logs

No runners
github-actions[bot] commented 5 months ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

Smana commented 5 months ago

I'm wondering if I misunderstood what to put under the githubConfigUrl :thinking:

Smana commented 5 months ago

oh it seems that specifying a repo did the trick, but would that mean that I should have a scaler-set per repo??

Smana commented 5 months ago

Ok the action was scheduled in my cluster even though I got the error

System.UnauthorizedAccessException: Access to the path '/home/runner/_work/_tool' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.FileSystem.CreateDirectory(String fullPath)
   at System.IO.Directory.CreateDirectory(String path)
   at GitHub.Runner.Worker.JobRunner.RunAsync(AgentJobRequestMessage message, CancellationToken jobRequestCancellationToken)
   at GitHub.Runner.Worker.JobRunner.RunAsync(AgentJobRequestMessage message, CancellationToken jobRequestCancellationToken)
   at GitHub.Runner.Worker.Worker.RunAsync(String pipeIn, String pipeOut)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)

But that's another issue, I'm digging into. Anyway can somebody answer to my question above? Then I'll close this issue.

Smana commented 5 months ago

Regarding the permissions issue I'm gonna try this method. But that's strange if this is required to change the permissions ...

Smana commented 5 months ago

I fixed my filesystem issue using

    template:
      spec:
        securityContext:
          runAsUser: 1001
          runAsGroup: 123
          fsGroup: 1000

I'm gonna close this issue and I'll ask my question regarding a scaler set per repo in the discussions.