mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
Merge pull request #174794 from maxeaubrey/kind_0.14.0
kind: 0.11.1 -> 0.14.0
This commit is contained in:
commit
7758705cfd
|
@ -4,13 +4,13 @@ with lib;
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "kind";
|
||||
version = "0.11.1";
|
||||
version = "0.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "kubernetes-sigs";
|
||||
repo = "kind";
|
||||
sha256 = "sha256-pjg52ONseKNw06EOBzD6Elge+Cz+C3llPvjJPHkn1cw=";
|
||||
sha256 = "sha256-yCzznSVWuVEkaoj9bo0WOp3Dvl3t1UJ/DwtXv5dp+dQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -18,7 +18,11 @@ buildGoModule rec {
|
|||
./kernel-module-path.patch
|
||||
];
|
||||
|
||||
vendorSha256 = "sha256-HiVdekSZrC/RkMSvcwm1mv6AE4bA5kayUsMdVCbckiE=";
|
||||
vendorSha256 = "sha256-/UDmTyngydoso9F/iPp5JYlsfi0VNfHfTsxdGDaTK+w=";
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
GOFLAGS = [ "-trimpath" ];
|
||||
ldFlags = [ "-buildid=" "-w" ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff --git a/pkg/cluster/internal/providers/common/getmodules.go b/pkg/cluster/internal/providers/common/getmodules.go
|
||||
new file mode 100644
|
||||
index 00000000..f42a883d
|
||||
index 00000000..1cce5675
|
||||
--- /dev/null
|
||||
+++ b/pkg/cluster/internal/providers/common/getmodules.go
|
||||
@@ -0,0 +1,15 @@
|
||||
|
@ -9,39 +9,39 @@ index 00000000..f42a883d
|
|||
+import "os"
|
||||
+
|
||||
+const (
|
||||
+ fhsKernalModulePath = "/lib/modules"
|
||||
+ nixKernalModulePath = "/run/booted-system/kernel-modules/lib"
|
||||
+ fhsKernelModulePath = "/lib/modules"
|
||||
+ nixKernelModulePath = "/run/booted-system/kernel-modules/lib/modules"
|
||||
+)
|
||||
+
|
||||
+func GetKernelModulePath() string {
|
||||
+ if _, err := os.Stat(nixKernalModulePath); !os.IsNotExist(err) {
|
||||
+ return nixKernalModulePath
|
||||
+ if _, err := os.Stat(nixKernelModulePath); !os.IsNotExist(err) {
|
||||
+ return nixKernelModulePath
|
||||
+ }
|
||||
+ return fhsKernalModulePath
|
||||
+ return fhsKernelModulePath
|
||||
+}
|
||||
diff --git a/pkg/cluster/internal/providers/docker/provision.go b/pkg/cluster/internal/providers/docker/provision.go
|
||||
index 50161861..86d5b7b6 100644
|
||||
index 97b05594..3aaa9830 100644
|
||||
--- a/pkg/cluster/internal/providers/docker/provision.go
|
||||
+++ b/pkg/cluster/internal/providers/docker/provision.go
|
||||
@@ -242,7 +242,7 @@ func runArgsForNode(node *config.Node, clusterIPFamily config.ClusterIPFamily, n
|
||||
@@ -225,7 +225,7 @@ func runArgsForNode(node *config.Node, clusterIPFamily config.ClusterIPFamily, n
|
||||
// (please don't depend on doing this though!)
|
||||
"--volume", "/var",
|
||||
// some k8s things want to read /lib/modules
|
||||
- "--volume", "/lib/modules:/lib/modules:ro",
|
||||
+ "--volume", fmt.Sprintf("%s:/lib/modules:ro", common.GetKernelModulePath()),
|
||||
// propagate KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER to the entrypoint script
|
||||
"-e", "KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
diff --git a/pkg/cluster/internal/providers/podman/provision.go b/pkg/cluster/internal/providers/podman/provision.go
|
||||
index 51dce486..3bc36b42 100644
|
||||
index 50aa7018..7e25a4de 100644
|
||||
--- a/pkg/cluster/internal/providers/podman/provision.go
|
||||
+++ b/pkg/cluster/internal/providers/podman/provision.go
|
||||
@@ -205,7 +205,7 @@ func runArgsForNode(node *config.Node, clusterIPFamily config.ClusterIPFamily, n
|
||||
@@ -189,7 +189,7 @@ func runArgsForNode(node *config.Node, clusterIPFamily config.ClusterIPFamily, n
|
||||
// dev: devices on the volume will be able to be used by processes within the container
|
||||
"--volume", fmt.Sprintf("%s:/var:suid,exec,dev", varVolume),
|
||||
// some k8s things want to read /lib/modules
|
||||
- "--volume", "/lib/modules:/lib/modules:ro",
|
||||
+ "--volume", fmt.Sprintf("%s:/lib/modules:ro", common.GetKernelModulePath()),
|
||||
// propagate KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER to the entrypoint script
|
||||
"-e", "KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
|
|
|
@ -15736,7 +15736,7 @@ with pkgs;
|
|||
|
||||
kcov = callPackage ../development/tools/analysis/kcov { };
|
||||
|
||||
kind = callPackage ../development/tools/kind { };
|
||||
kind = callPackage ../development/tools/kind { buildGoModule = buildGo118Module; };
|
||||
|
||||
khronos-ocl-icd-loader = callPackage ../development/libraries/khronos-ocl-icd-loader { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue