Skip to content

Add windows runner support. #1986

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

isarkis
Copy link
Contributor

@isarkis isarkis commented Nov 5, 2022

  • Add windows runner related files.
  • Do not explicitly set privileged bit in security context to false. Privileged mode is false by default and setting it explicitly to false causes GKE not admit windows runner pod.

@mumoshu
Copy link
Collaborator

mumoshu commented Nov 5, 2022

@isarkis Hey! Quick question- how can I test the Windows runner on my machine? Do I need to run kubelet on a Windows machine and register it to my K8s control-plane?

@isarkis
Copy link
Contributor Author

isarkis commented Nov 7, 2022

@isarkis Hey! Quick question- how can I test the Windows runner on my machine? Do I need to run kubelet on a Windows machine and register it to my K8s control-plane?

Yes, you need to add windows node(s) to you K8s cluster, and then deploy win RunnerDeployemnt. You will also need to have your win runner deployment configured to deploy win runners on win node(s). I was able to do that by setting nodeSelector in RunnerDeployment spec to something like so:

      nodeSelector:
        kubernetes.io/os: windows

@isarkis
Copy link
Contributor Author

isarkis commented Nov 8, 2022

@isarkis Could you also enhance https://github.com/actions-runner-controller/actions-runner-controller/blob/master/.github/workflows/runners.yaml and https://github.com/actions-runner-controller/actions-runner-controller/blob/master/.github/workflows/validate-runners.yaml to test and build Windows runners?

@mumoshu docker/build-push-actions used here doesn't support windows. Are you open to using different action to build windows docker images? Also, can you allow workflows to run on this PR, I will need that to test changes to .github folder?

@mumoshu
Copy link
Collaborator

mumoshu commented Nov 9, 2022

Also, can you allow workflows to run on this PR, I will need that to test changes to .github folder?

@isarkis I thought pull request workflows are triggered using the workflow definitions from the main branch, not your remote branch. So you'd better make it work on your repository first, then update this pull request with the example workflow run results from your repo.

Are you open to using different action to build windows docker images?

Depends on what you're going to use!
Generally speaking, I'd prefer adding an experimental workflow or workflow job step just for Windows builds, rather than changing everything to use a single action, so that we don't need to worry about breaking existing images just for the addition of Windows support.

@isarkis isarkis force-pushed the feature/windows_support branch from f6fce8e to 13d082c Compare November 10, 2022 19:09
@isarkis
Copy link
Contributor Author

isarkis commented Nov 11, 2022

@mumoshu I went ahead and updated the Makefile and the runner GitHub workflow. Then, I started looking at the runner unit tests, and realized that it might not be as trivial to do on Windows as I expected. They probably would have to be written in Powershell, and I don't have much experience with it. Having said that, I am going to have to find some spare cycles and tackle this in the next couple of weeks. In meantime, we really want to fix the windows runner pod admission problem on GKE, and so I broke out this PR into two. I went ahead and created #2009, can you please take a look at it?

@GoranHalvarsson
Copy link

What is the status here?

When will you guys accept this PR?

We need windows support :-)

@Link- Link- added community Community contribution needs triage Requires review from the maintainers labels Mar 21, 2023
@isarkis
Copy link
Contributor Author

isarkis commented Apr 13, 2023

What is the status here?

When will you guys accept this PR?

We need windows support :-)

I think adding unit test is the only missing part on this PR. Unfortunately, I don't have any cycles to work on this. Looking for some volunteer(s) to help out.

@mumoshu
Copy link
Collaborator

mumoshu commented Apr 14, 2023

Hey @isarkis! Thanks for your efforts here. I recently got a Windows laptop. Is there any way to provision a local K8s cluster on Windows and test this pull request locally? If so, I'll be able to undertake this one!

// To everyone reading this- Please feel free to contribute any pull requests based on this if you have some bandwidth! You don't need to wait for us.

@isarkis
Copy link
Contributor Author

isarkis commented Apr 14, 2023

I haven't tried this, but I would imagine something like this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution needs triage Requires review from the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants