forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 122650 (regression in PR 122552) ``` $ make WHAT=test/e2e/e2e.test +++ [0109 10:06:53] Building go targets for darwin/amd64 k8s.io/kubernetes/test/e2e/e2e.test (test) package k8s.io/kubernetes/test/e2e imports k8s.io/kubernetes/test/e2e/common imports k8s.io/kubernetes/test/e2e/common/node imports k8s.io/kubernetes/pkg/kubelet imports github.com/opencontainers/runc/libcontainer/userns: C source files not allowed when not using cgo or SWIG: userns_maps.c !!! [0109 10:06:54] Call tree: !!! [0109 10:06:54] 1: /Users/suda/gopath/src/k8s.io/kubernetes/hack/lib/golang.sh:948 kube::golang::build_binaries_for_platform(...) !!! [0109 10:06:54] 2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0109 10:06:54] Call tree: !!! [0109 10:06:54] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0109 10:06:54] Call tree: !!! [0109 10:06:54] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) make: *** [all] Error 1 ``` Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
- Loading branch information
1 parent
9e0ecca
commit 2e999ff
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Copyright 2024 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package inuserns | ||
|
||
import libcontaineruserns "github.com/opencontainers/runc/libcontainer/userns" | ||
|
||
// RunningInUserNS detects whether the current process is running in a user namespace. | ||
func RunningInUserNS() bool { | ||
return libcontaineruserns.RunningInUserNS() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
/* | ||
Copyright 2024 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package inuserns | ||
|
||
// RunningInUserNS detects whether the current process is running in a user namespace. | ||
func RunningInUserNS() bool { | ||
return false | ||
} |