mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Fix discovering cluster wide resources with namespace (#904)
This commit is contained in:
committed by
GitHub
parent
536c3209d2
commit
4f903ec08b
Vendored
+4
-1
@@ -39,9 +39,12 @@ type LiveStateCache interface {
|
||||
|
||||
func GetTargetObjKey(a *appv1.Application, un *unstructured.Unstructured, isNamespaced bool) kube.ResourceKey {
|
||||
key := kube.GetResourceKey(un)
|
||||
if isNamespaced && key.Namespace == "" {
|
||||
if !isNamespaced {
|
||||
key.Namespace = ""
|
||||
} else if isNamespaced && key.Namespace == "" {
|
||||
key.Namespace = a.Spec.Destination.Namespace
|
||||
}
|
||||
|
||||
return key
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user