question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support running in an in-cluster self-hosted worker without separately setting context

See original GitHub issue

Using a solution like summerwind/actions-runner-controller, it is possible to run a self-hosted worker in a Kubernetes cluster. This self-hosted worker can then use the Kubernetes service account the worker is running under to authenticate to the K8s API to eg. do deployment.

Azure/k8s-deploy instead insists on a “context” set by Azure/k8s-set-context. It cannot use or refuses to use the Kubernetes native service account authentication (ie. token and connection info mounted at /var/run/secrets/kubernetes.io/serviceaccount).

As a rule of thumb, I think if kubectl is able to run, Azure/k8s-deploy should be able to run. If you feel this is out of scope for k8s-deploy, alternatively k8s-set-context should be augmented to support the native way.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
japsucommented, Jul 19, 2021

@koushdey My actions runner is running in a pod in a Kubernetes cluster. That pod is running on a service account that has the required access. If I were to run kubectl commands in that pod, they would use the Kubernetes credentials supplied to the pod by Kubernetes and succeed. k8s-set-context with the service account method asks for information that is not relevant or which I do not have in this use case.

1reaction
thesattirajucommented, Jul 9, 2021

@koushdey inorder to support this, perhaps we could change the logic of throwing the error into a warning instead.

https://github.com/Azure/k8s-deploy/blob/acd12a47055b679be711e4937c41f1755316cfae/src/run.ts#L43-L47

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use self-hosted GitHub Actions runners | Red Hat Developer
We have developed a set of tools that can install GitHub Actions runners onto an existing Red Hat OpenShift or Kubernetes cluster. They...
Read more >
Customize self-hosted runners (w/security best ... - YouTube
Adopting GitHub Actions at scale in the Enterprise (Part 3/3)For the full series: ...
Read more >
CircleCI's self-hosted runner FAQs
Resource classes help you identify a pool of self-hosted runners, which allow you to set up your configuration to send jobs to specific...
Read more >
Self-hosted gateway on Kubernetes in production
Support for Azure API Management self-hosted gateway version 0 and version 1 container images is ending on 1 October 2023, along with its ......
Read more >
Temporal Server self-hosted production deployment
Have a separate persistence (database) for each deployment · Cluster membership ports should be different for each deployment (they can be set through ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found