Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the ownerRef helper in SDK #1060

Closed
cmwylie19 opened this issue Aug 15, 2024 · 0 comments · Fixed by #1104
Closed

Enhance the ownerRef helper in SDK #1060

cmwylie19 opened this issue Aug 15, 2024 · 0 comments · Fixed by #1104
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cmwylie19
Copy link
Collaborator

cmwylie19 commented Aug 15, 2024

Is your feature request related to a problem? Please describe.

Need to add more finalizer support and protect "owned" resources so they don't get deleted unless the owning object is deleted.

  const { name, uid } = instance.metadata!;

  return [
    {
      apiVersion: instance.apiVersion!,
      kind: instance.kind!,
      uid: uid!,
      name: name!,
      controller: true, // add
      blockOwnerDeletion: true, // add
    },
  ];
}

Kubernetes Docs around ownerRefs

Describe the solution you'd like

  • Given a controller deploys a deployment that is owned by a WebApp
  • When someone tries to delete the deployment
  • Then deletion is blocked until the WebApp is deleted

Describe alternatives you've considered

(optional) A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants