You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2021/10/31 05:55:50 UTC
[skywalking-infra-e2e] branch main updated: Remove manifest only
could apply default namesapce resource (#63)
This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git
The following commit(s) were added to refs/heads/main by this push:
new ebdfc93 Remove manifest only could apply default namesapce resource (#63)
ebdfc93 is described below
commit ebdfc93c9a1def23df14edd408e98654a1fe60cb
Author: mrproliu <74...@qq.com>
AuthorDate: Sun Oct 31 13:55:43 2021 +0800
Remove manifest only could apply default namesapce resource (#63)
---
internal/util/k8s.go | 5 -----
1 file changed, 5 deletions(-)
diff --git a/internal/util/k8s.go b/internal/util/k8s.go
index d16537c..8c4be1f 100644
--- a/internal/util/k8s.go
+++ b/internal/util/k8s.go
@@ -21,7 +21,6 @@ package util
import (
"bytes"
"context"
- "fmt"
"io/ioutil"
"os"
"path/filepath"
@@ -146,10 +145,6 @@ func OperateManifest(c *kubernetes.Clientset, dc dynamic.Interface, manifest str
var dri dynamic.ResourceInterface
if mapping.Scope.Name() == meta.RESTScopeNameNamespace {
- // constrict resources to the default namespace
- if unstructuredObj.GetNamespace() != "" && unstructuredObj.GetNamespace() != metav1.NamespaceDefault {
- return fmt.Errorf("all resources must in default namespace")
- }
if unstructuredObj.GetNamespace() == "" {
unstructuredObj.SetNamespace(metav1.NamespaceDefault)
}