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

Commit

Permalink
Add Provider ownerReferences to Host CRs (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
mturley committed Feb 15, 2021
1 parent 027492f commit ad3b0e6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/queries/hosts.ts
Expand Up @@ -121,7 +121,17 @@ const generateHostConfig = (
return {
apiVersion: CLUSTER_API_VERSION,
kind: 'Host',
metadata: existingConfig?.metadata || getHostConfigRef(provider, host),
metadata: {
...(existingConfig?.metadata || getHostConfigRef(provider, host)),
ownerReferences: [
{
apiVersion: provider.object.apiVersion,
kind: provider.object.kind,
name: provider.object.metadata.name,
uid: provider.object.metadata.uid,
},
],
},
spec: {
id: host.id,
ipAddress: matchingNetworkAdapter?.ipAddress || '',
Expand Down

0 comments on commit ad3b0e6

Please sign in to comment.