Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
Use val.Namespace in place of instance.Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jintusebastian committed Jan 23, 2024
1 parent a9085ae commit f3933b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion interoperator/internal/resources/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,15 @@ func computeInputObjects(client kubernetes.Client, instance *osbv1alpha1.SFServi
obj := &unstructured.Unstructured{}
obj.SetKind(val.Kind)
obj.SetAPIVersion(val.APIVersion)
valNamespace := func() string {
if val.Namespace == "" {
return name.Namespace

Check warning on line 268 in interoperator/internal/resources/helper.go

View check run for this annotation

Codecov / codecov/patch

interoperator/internal/resources/helper.go#L268

Added line #L268 was not covered by tests
}
return val.Namespace
}()
namespacedName := types.NamespacedName{
Name: val.Name,
Namespace: name.Namespace,
Namespace: valNamespace,
}
err := client.Get(context.TODO(), namespacedName, obj)
if err != nil {
Expand Down

0 comments on commit f3933b8

Please sign in to comment.