Skip to content

Commit

Permalink
Use temporary fork of WinCNI to add support for CNIVersion=1.0.0
Browse files Browse the repository at this point in the history
See containerd/nerdctl#28 (comment)

We're waiting for a release that contains changes from microsoft/windows-container-networking#101
  • Loading branch information
slonopotamus committed Jul 12, 2024
1 parent 80c0dba commit 97b12b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
9 changes: 6 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const BUILDKIT_VERSION: &str = "0.15.0-rc2";
const BUILDKIT_URL: &str = formatcp!("https://github.com/moby/buildkit/releases/download/v{BUILDKIT_VERSION}/buildkit-v{BUILDKIT_VERSION}.windows-amd64.tar.gz");
const BUILDKIT_SHA: &str = "b6676f8f831d02e2c371a92bde2d754646c5bb88b700497190ade44d8bdce75e";

const CNI_VERSION: &str = "0.3.0";
const CNI_URL: &str = formatcp!("https://github.com/microsoft/windows-container-networking/releases/download/v{CNI_VERSION}/windows-container-networking-cni-amd64-v{CNI_VERSION}.zip");
const CNI_SHA: &str = "e156fa64facb475a848b19dd32db5508f76dd9daca93da8ac9c3723ea0bdd402";
// TODO: Replace with upstream when they make a release with changes from https://github.com/microsoft/windows-container-networking/pull/101
// This is a temporary workaround for https://github.com/containerd/nerdctl/issues/28#issuecomment-2222391443
// nerdctl wants CNIVersion=1.0.0, but CNI plugins only support 0.3.0
const CNI_VERSION: &str = "0.4.0";
const CNI_URL: &str = formatcp!("https://github.com/slonopotamus/windows-container-networking/releases/download/v{CNI_VERSION}/windows-container-networking-cni-amd64-{CNI_VERSION}.zip");
const CNI_SHA: &str = "6b451c9fdf05e5babb4d916ddca85db9089ea5416225ff9b310874b440c20670";

fn get_dest_dir() -> PathBuf {
//<root or manifest path>/target/<profile>/
Expand Down
10 changes: 0 additions & 10 deletions wix/main.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@
<File Source='target\$(var.Profile)\sdnoverlay.exe'/>
</Component>
</Directory>
<Directory Id='cni_conf' Name='conf'>
<Component Id='cniconf_Comp' Guid='2aa6f652-59c0-4f86-8fbb-32471d3aa2e0'>
<!--
TODO: This is a temporary workaround for https://github.com/containerd/nerdctl/issues/28#issuecomment-2222391443
nerdctl wants CNIVersion=1.0.0, but CNI plugins only support 0.3.0
-->
<File Source='wix\nerdctl-nat.conflist'/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
Expand Down Expand Up @@ -331,7 +322,6 @@

<ComponentRef Id='containerd_Comp'/>
<ComponentRef Id='cni_Comp'/>
<ComponentRef Id='cniconf_Comp'/>
</Feature>
</Feature>

Expand Down
23 changes: 0 additions & 23 deletions wix/nerdctl-nat.conflist

This file was deleted.

0 comments on commit 97b12b0

Please sign in to comment.