Merge pull request #699 from Liujingfang1/fix657

Allow namespaced object to refer cluster level object
This commit is contained in:
Kubernetes Prow Robot
2019-01-17 14:04:47 -08:00
committed by GitHub
2 changed files with 62 additions and 1 deletions

View File

@@ -130,7 +130,7 @@ func (m ResMap) FilterBy(inputId resid.ResId) ResMap {
}
result := ResMap{}
for id, res := range m {
if id.Namespace() == inputId.Namespace() &&
if id.Gvk().IsClusterKind() || id.Namespace() == inputId.Namespace() &&
id.HasSameLeftmostPrefix(inputId) &&
id.HasSameRightmostSuffix(inputId) {
result[id] = res