kubernetes-sigs / sig-windows-tools

Repository for tools and artifacts related to the sig-windows charter in Kubernetes. Scripts to assist kubeadm and wincat and flannel will be hosted here.
Apache License 2.0
126 stars 123 forks source link

Scripts update to make them usable with hostprocess model #248

Closed a4099181 closed 1 year ago

a4099181 commented 2 years ago

Reason for PR: It seems that Install-Container.ps1 and PrepareNode.ps1 may be useful to build a Windows node with HostProcess containers and k8s 1.25.3 at least. But some changes are needed because some code does not cooperate. This commit is a proposal to leave the current code unchanged for backward compatibility and introduce the UseHostProcess parameter to handle code not needed to support HostProcess containers where are engaged.

Requirements

Notes: There are also changes beyond the main reason. When the UseHostProcess flag is present, the script makes asserts on Kubernetes and ContainerD versions to announce incompatibilities. Another improvement is to not have a choice of container runtime when HostProcess is in use.

Additionally, it offers the SuppressHints parameter to have the option to omit on demand some help messages. Omitted code depends on the git tool installed. It may be an optimization for automated node provisioning (eg. vagrant) and saves some time wasted for git install and repository cloning.

marosset commented 1 year ago

/assign

marosset commented 1 year ago

The behavior of volume mounts changes depending on if you are using containerd v1.6.x vs v1.7.x (more info at https://github.com/kubernetes/enhancements/tree/master/keps/sig-windows/1981-windows-privileged-container-support#container-mounts)

Can we update all the references to default to https://github.com/containerd/containerd/releases/tag/v1.7.0-beta.1 instead of v1.6.8 (until v1.7.0 releases)?

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: a4099181 Once this PR has been reviewed and has the lgtm label, please ask for approval from marosset by writing /assign @marosset in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jsturtevant commented 1 year ago

Thanks for your updates here. We discussed at sig-windows community meeting a couple weeks ago and decided it would be easier to maintain long term just the HostProcess parts in the scripts going forward (https://github.com/kubernetes-sigs/sig-windows-tools/pull/262).

I am going to close this PR since the changes were made in #262. Please open issue/pr if those changes aren't working with Hostprocess. Thanks again for your interest here.

/close