all binaries are built using the base-image, which contains goboring FIPS 140-3 compliant Go toolchains
- build multi-platform base image: rosskirkpat/base-image
- publish base image for windows/linux arm64 + amd64 to rosskirkpat/base-image on DockerHub
- build all kubernetes binaries for windows
- publish kubernetes binaries for windows to rosskirkpat/kubernetes on GitHub
- package windows binaries in windows container images for all kubernetes components w/ tag
rosskirkpat/$Component
- package external binary dependencies (coredns) // TODO: compile coredns binary using base-image
- publish all windows container images to
rosskirkpat/$Component
on DockerHub
base-image build triggers:
- new goboring version available for current minor go version (ex. 1.18.4 is released and previous builds were using 1.18.3)
- manual trigger
kubernetes component build triggers:
- new base-image version published
- manual trigger
Host process containers???
New-Item -Type Directory -Path "C:\winkube\package" -Force
curl.exe -LO https://github.com/etcd-io/etcd/releases/download/v3.5.4/etcd-v3.5.4-windows-amd64.zip Expand-Archive etcd-v3.5.4-windows-amd64.zip Copy-Item etcd*.exe C:\winkube\package\
curl.exe -LO https://github.com/coredns/coredns/releases/download/v1.9.3/coredns_1.9.3_windows_amd64.tgz tar xz coredns_1.9.3_windows_amd64.tgz Copy-Item coredns.exe C:\winkube\package\
make binaries
make
the manifest currently supports linux only due to node selectors
containerd cni-plugins calico flannel + flannel cni plugin
curl.exe -LO https://github.com/flannel-io/flannel/releases/download/v0.20.2/flanneld.exe Copy-Item coredns.exe C:\winkube\package\
curl.exe -LO https://github.com/flannel-io/flannel/releases/download/v0.20.2/flannel-v0.20.2-windows-amd64.tar.gz tar xz flannel-v0.20.2-windows-amd64.tar.gz
crictl ctr
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/addons/dns/manifests.go
- add windows node selectors to kube-proxy manifest https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/addons/proxy/manifests.go
- add windows support to coredns manifest https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/addons/dns/manifests.go
- build and publish coredns windows binaries https://coredns.io/2016/10/30/quick-start-for-windows/
- swap out docker for nerdctl+containerd OR crane OR ko
- webhook to build when a new stable k8s release is published
- migrate to host process containers
- Finish powershell scripts for automated builds
- move main functions to utils.psm1 and use them as modules
###################3
# m1 mac - amd64
brew install mingw-w64 bash coreutils
git clone github.com/kubernetes/kubernetes && cd kubernetes
git fetch --tags
git reset --hard HEAD
git checkout v1.26.1
gsed -i '0,/KUBE_SUPPORTED_SERVER_PLATFORMS/!b;//a\ windows\/amd64' hack/lib/golang.sh
git add hack/lib/golang.sh
git commit -m "windows/amd64 server builds"
KUBE_BUILD_PLATFORMS=windows/amd64 KUBE_FASTBUILD=false make cross
# _output/local/bin/windows/amd64/*.exe
```console
# modified KUBE_SUPPORTED_SERVER_PLATFORMS
+++ [0203 13:23:53] Building go targets for windows/amd64
k8s.io/kubernetes/cmd/kube-proxy (static)
k8s.io/kubernetes/cmd/kube-apiserver (static)
k8s.io/kubernetes/cmd/kube-controller-manager (static)
k8s.io/kubernetes/cmd/kubelet (non-static)
k8s.io/kubernetes/cmd/kubeadm (static)
k8s.io/kubernetes/cmd/kube-scheduler (static)
k8s.io/component-base/logs/kube-log-runner (static)
k8s.io/kube-aggregator (non-static)
k8s.io/apiextensions-apiserver (non-static)
k8s.io/kubernetes/cluster/gce/gci/mounter (non-static)
# original KUBE_SUPPORTED_SERVER_PLATFORMS
+++ [0203 13:21:37] Building go targets for windows/amd64
k8s.io/kubernetes/cmd/kube-proxy (static)
k8s.io/kubernetes/cmd/kubeadm (static)
k8s.io/kubernetes/cmd/kubelet (non-static)
k8s.io/component-base/logs/kube-log-runner (static)
# m1 mac - arm64
git clone github.com/kubernetes/kubernetes && cd kubernetes
git fetch --tags
git reset --hard HEAD
git checkout v1.26.1
gsed -i '0,/KUBE_SUPPORTED_SERVER_PLATFORMS/!b;//a\ windows\/arm64' hack/lib/golang.sh
git add hack/lib/golang.sh
git commit -m "windows/arm64 server builds"
KUBE_BUILD_PLATFORMS=windows/arm64 KUBE_FASTBUILD=false make cross
# _output/local/bin/windows/arm64/*.exe
+++ [0203 13:30:09] Building go targets for windows/arm64
k8s.io/kubernetes/cmd/kube-proxy (static)
k8s.io/kubernetes/cmd/kube-apiserver (static)
k8s.io/kubernetes/cmd/kube-controller-manager (static)
k8s.io/kubernetes/cmd/kubelet (non-static)
k8s.io/kubernetes/cmd/kubeadm (static)
k8s.io/kubernetes/cmd/kube-scheduler (static)
k8s.io/component-base/logs/kube-log-runner (static)
k8s.io/kube-aggregator (non-static)
k8s.io/apiextensions-apiserver (non-static)
k8s.io/kubernetes/cluster/gce/gci/mounter (non-static)