36 Star 412 Fork 76

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
app
cleanup
k8s
package
pkg
agent
api
audit
auth
catalog
cert
clustermanager
clusterprovisioninglogger
clusterrouter
configfield
controllers
dialer
dynamiclistener
embedded
encryptedstore
filter
httpproxy
hyperkube
image
k8scheck
k8slookup
k8sproxy
kubeconfig
kubectl
librke
logserver
namespace
namespace.go
namespace_utils.go
node
nodeconfig
pipeline
project
randomtoken
rbac
ref
remotedialer
resourcequota
rkecerts
rkedialerfactory
rkenodeconfigclient
rkenodeconfigserver
rkeworker
settings
systemaccount
systemtemplate
telemetry
templatecontent
ticker
tls
tunnelserver
rke-templates
scripts
server
tests
vendor
.dockerignore
.drone.yml
.gitignore
CONTRIBUTING.md
Dockerfile.dapper
LICENSE
Makefile
README.md
README_1_6.md
code-of-conduct.md
keybase.md
main.go
vendor.conf
克隆/下载
namespace.go 342 Bytes
一键复制 编辑 原始数据 按行查看 历史
package namespace
import "k8s.io/api/core/v1"
var projectIDAnnotation = "field.cattle.io/projectId"
func NsByProjectID(obj interface{}) ([]string, error) {
ns, ok := obj.(*v1.Namespace)
if !ok {
return []string{}, nil
}
if id, ok := ns.Annotations[projectIDAnnotation]; ok {
return []string{id}, nil
}
return []string{}, nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.1.0-rc9

搜索帮助