Skip to content

Commit

Permalink
fix component instance validation to use cluster NS
Browse files Browse the repository at this point in the history
  • Loading branch information
romangithub1024 committed Jun 6, 2018
1 parent 44a8601 commit bbde8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/engine/resolve/policy_resolution.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (resolution *PolicyResolution) Validate(policy *lang.Policy) error {
}

// verify that cluster exists
clusterObj, err := policy.GetObject(lang.ClusterObject.Kind, componentKey.ClusterName, runtime.SystemNS)
clusterObj, err := policy.GetObject(lang.ClusterObject.Kind, componentKey.ClusterName, componentKey.ClusterNameSpace)
if clusterObj == nil || err != nil {
// component instance points to non-existing cluster, meaning this component instance is now orphan
return fmt.Errorf("cluster '%s/%s' can only be deleted after it's no longer in use. still used by: %s", componentKey.Namespace, componentKey.ClusterName, componentKey.GetKey())
Expand Down

0 comments on commit bbde8f4

Please sign in to comment.