Skip to content

Commit a09c374

Browse files
committed
sig-windows contributing.md updates
Signed-off-by: Mark Rossetti <[email protected]>
1 parent fbc5ca5 commit a09c374

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

sig-windows/CONTRIBUTING.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,46 @@
22

33
Contains a list of common resources when contributing in the effort to support Windows Node and Windows Server containers in Kubernetes.
44

5-
- [Joining the community of other contributors](#joining-the-community-of-other-contributors)
6-
- [Find work in progress](#find-work-in-progress)
7-
- [Building Kubernetes for Windows from Source](#building-kubernetes-for-windows-from-source)
8-
- [Build Prerequisites](#build-prerequisites)
9-
- [Building Kubernetes binaries for Windows](#building-kubernetes-binaries-for-windows)
10-
- [Updating the Node binaries](#updating-the-node-binaries)
5+
- [Joining the community of other contributors](#joining-the-community-of-other-contributors)
6+
- [Find work in progress](#find-work-in-progress)
7+
- [Building Kubernetes for Windows from Source](#building-kubernetes-for-windows-from-source)
8+
- [Build Prerequisites](#build-prerequisites)
9+
- [Building Kubernetes binaries for Windows](#building-kubernetes-binaries-for-windows)
10+
- [Updating the Node binaries](#updating-the-node-binaries)
1111
- [Creating a PR](#creating-a-pr)
1212
- [API Considerations](#api-considerations)
1313
- [Running Tests](#running-tests)
1414
- [Troubleshooting](#troubleshooting)
15-
- [Reporting Issues and Feature Requests](#reporting-issues-and-feature-requests)
16-
- [Gathering Logs](#gathering-logs)
15+
- [Reporting Issues and Feature Requests](#reporting-issues-and-feature-requests)
16+
- [Gathering Logs](#gathering-logs)
1717
- [Collecting Networking Logs](#collecting-networking-logs)
1818

1919
## Joining the community of other contributors
2020

21-
The best way to get in contact with the contributors working on Windows support is through the Kubernetes Slack. To get a Slack invite, visit [http://slack.k8s.io/](http://slack.k8s.io/) . Once you're logged in, join us in the [#SIG-Windows](https://kubernetes.slack.com/messages/sig-windows) channel. You can also use the [Kubernetes Community Forums](https://discuss.kubernetes.io/c/general-discussions/windows) to chat about Windows containers on Kubernetes.
21+
The best way to get in contact with the contributors working on Windows support is through the Kubernetes Slack. To get a Slack invite, visit [http://slack.k8s.io/](http://slack.k8s.io/) . Once you're logged in, join us in the [#SIG-Windows](https://kubernetes.slack.com/messages/sig-windows) channel.
2222

2323
To get access to shared documents, meeting calendar, and additional discussions, be sure to also join the [SIG-Windows Google Group](https://groups.google.com/forum/#!forum/kubernetes-sig-windows).
2424

2525
View the leadership team in SIG-Windows and other subprojects in the [getting started](https://github.com/kubernetes/community/tree/master/sig-windows) guide.
2626

2727
## Find work in progress
2828

29-
To get a handle on current work, you can view [outstanding PRs](https://github.com/kubernetes/kubernetes/pulls?q=is%3Apr+is%3Aopen+label%3Asig%2Fwindows+is%3Apr).
29+
View the SIG-Windows [project board](https://github.com/orgs/kubernetes/projects/8).
30+
This project board is updated during our [bi-weekly backlog refinement meeting](https://github.com/kubernetes/community/tree/master/sig-windows#meetings).
3031

31-
View the SIG-Windows project board, tracking detailed [issues across Kubernetes releases](https://github.com/orgs/kubernetes/projects/8).
32+
View current [outstanding PRs](https://github.com/kubernetes/kubernetes/pulls?q=is%3Apr+is%3Aopen+label%3Asig%2Fwindows) and [open issues](https://github.com/kubernetes/kubernetes/issues?q=is%3Aissue+is%3Aopen+label%3Asig%2Fwindows).
3233

3334
## Building Kubernetes for Windows from Source
3435

35-
The Kubernetes build scripts have not been ported to Windows, so it's best to run in a Linux VM where you can run the same Docker container used in the official Kubernetes builds. This simplifies the steps, but means that you cannot build under Windows Subsystem for Linux (WSL).
36+
The Kubernetes build scripts have not been ported to Windows, so it's best to develop in a Linux VM or [WSL2](https://docs.microsoft.com/windows/wsl/) environment where you can run the same Docker container used in the official Kubernetes builds.
3637

37-
It's best to skim over the [Building Kubernetes](https://github.com/kubernetes/kubernetes/blob/master/build/README.md) guide if you have never built Kubernetes before to get the latest info. These steps are a summary focused on cross-building the Windows node binaries (kubelet & kube-proxy).
38+
It's best to read through the [Building Kubernetes](https://github.com/kubernetes/kubernetes/blob/master/build/README.md) guide if you have never built Kubernetes before to get the latest info. These steps are a summary focused on cross-building the Windows node binaries (kubectl, kubelet, and kube-proxy).
3839

3940
### Build Prerequisites
4041

4142
At least 60GB of disk space is required, and 16GB of memory (or memory + swap).
4243

43-
Once you have a VM, install Git, [Docker-CE](https://docs.docker.com/install/), and make. The build scripts will pull a Docker container with the required version of golang and other needed tools preinstalled.
44+
In your developer environment, install Git, [Docker-CE](https://docs.docker.com/install/), and make. The build scripts will pull a Docker container with the required version of golang and other needed tools preinstalled.
4445

4546
If you're using Ubuntu, then install the following packages: git, build-essential, [Docker-CE](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
4647

@@ -52,30 +53,36 @@ If you would like to build all binaries at once, then run `./build/run.sh make c
5253

5354
Once the build completes, the files will be in `_output/dockerized/bin`.
5455

55-
### Updating the Node binaries
56+
### Testing your changes
5657

57-
Once you have binaries built, the easiest way to test them is to replace them on an existing cluster. This section assumes you already have a cluster in the cloud of your choice. To update the binaries on an existing node, follow these steps:
58+
#### Build a local cluster
5859

59-
1. Drain & cordon a node with `kubectl drain <nodename>`
60+
The easist way to test changes is to use the community maintained [SIG Windows developer environment](https://github.com/kubernetes-sigs/sig-windows-dev-tools#welcome-to-the-sig-windows-development-environment) project.
61+
You can use this to build a fully functional cluster locally with binaries built from source.
62+
63+
#### Updating the Node binaries
64+
65+
If you already have an existing cluster you also test your changes by swapping the binaries on a node.
66+
To update the binaries on an existing node, follow these steps:
67+
68+
1. Drain & cordon a node with `kubectl drain <nodename>`.
6069
2. Connect to the node with SSH or Windows Remote Desktop, and start PowerShell
61-
3. On the node, run `Stop-Service kubelet -Force`
62-
4. Copy kubelet.exe and kube-proxy.exe to a cloud storage account, or use SSH to copy them directly to the node.
70+
3. On the node, run `Stop-Service kube-proxy -Force` followed by `Stop-Service kubelet -Force`.
71+
4. Copy kubelet.exe and kube-proxy.exe to the node.
6372
5. Overwrite the existing kubelet & kube-proxy binaries. If you don't know where they are, run `sc.exe qc kubelet` or `sc.exe qc kube-proxy` and look at the BINARY_PATH_NAME returned.
64-
6. Start the updated kubelet & kube-proxy with `Start-Service kubelet`
73+
6. Start the updated kubelet & kube-proxy with `Start-Service kubelet`.
6574

6675
## Creating a PR
6776

68-
Congratulations on contributing to the SIG-Windows ecosystem. If there is a PR you would like to build, it's easy. You can create a working branch, pull the changes from GitHub in a patch, apply, then build.
77+
Congratulations on contributing to the SIG-Windows ecosystem.
78+
If there is a PR you would like to build, it's easy. You can create a working branch, pull the changes from GitHub in a patch, apply, then build.
79+
80+
Please follow the Kubernetes contribute guide for [pull-requests](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md) when submitting your changes.
6981

70-
The detailed steps here are based off an example PR on GitHub: [https://github.com/kubernetes/kubernetes/pull/74788](https://github.com/kubernetes/kubernetes/pull/74788). Be sure to replace the URL and steps with the PR you want to test.
82+
Additionally please perform the following:
7183

72-
1. Make sure your local clone is up-to-date with master: `git checkout master ; git pull master`
73-
2. Create a branch in your repo: `git checkout -b pr74788`
74-
3. Get the patch for the PR you want. Append `.patch` to the URL, and download it with curl: `curl -L -o pr74788.patch https://github.com/kubernetes/kubernetes/pull/74788.patch`
75-
4. Merge it with `patch -p1 < pr74788.patch`
76-
5. If there are errors, fix them as needed. Once you're done, delete the `.patch` file and then `git commit` the rest to your local branch.
77-
6. Deploy your own cluster, including Windows Nodes
78-
7. Test Your Changes
84+
1. Add the **sig/windows** label to your PR by adding `/sig windows` in the pull request description or a comment.
85+
1. Trigger windows specific e2e test by adding `/test pull-kubernetes-e2e-aks-engine-windows-containerd` in a comment.
7986

8087
## API Considerations
8188

0 commit comments

Comments
 (0)