sig-windows-tools icon indicating copy to clipboard operation
sig-windows-tools copied to clipboard

Scripts update to make them usable with hostprocess model

Open a4099181 opened this issue 2 years ago • 1 comments

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

  • [x] Squash commits

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.

a4099181 avatar Oct 26 '22 16:10 a4099181

[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 assign jsturtevant for approval by writing /assign @jsturtevant 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:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 26 '22 16:10 k8s-ci-robot

/assign

marosset avatar Dec 14 '22 16:12 marosset

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)?

marosset avatar Dec 14 '22 18:12 marosset

[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:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Dec 14 '22 18:12 k8s-ci-robot

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

jsturtevant avatar Dec 22 '22 14:12 jsturtevant