Skip to content

Commit

Permalink
Merge pull request #1255 from yaacov/dont-use-namespace-for-owner-refs
Browse files Browse the repository at this point in the history
🐞 Don't use namespace for owner refs
  • Loading branch information
yaacov authored Jun 30, 2024
2 parents 35a2a55 + 4fbf084 commit b504688
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ async function processHostSecretPair(
apiVersion: 'forklift.konveyor.io/v1beta1',
kind: 'Provider',
name: provider.metadata.name,
namespace: provider.metadata.namespace,
uid: provider.metadata.uid,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ const createPlan = async (
};

const addOwnerRef = async (model: K8sModel, resource, ownerReferences) => {
const cleanOwnerReferences = ownerReferences.map((ref) => ({
...ref,
namespace: undefined,
}));

return await k8sPatch({
model,
resource,
data: [
{
op: 'add',
path: '/metadata/ownerReferences',
value: ownerReferences,
value: cleanOwnerReferences,
},
],
});
Expand Down

0 comments on commit b504688

Please sign in to comment.