Skip to content

Tenant with loadbalancer quota cannot be deleted #1746

Description

Describe the bug
Tenant gets stuck on deletion if it has a quota for services.loadbalancers.

To Reproduce
Create a tenant

kubectl create -f <<EOF
apiVersion: apps.cozystack.io/v1alpha1
kind: Tenant
metadata:
  name: user
  namespace: tenant-root
spec:
  resourceQuotas:
    services.loadbalancers: "3"
EOF

After all is reconciled, delete the tenant

kubectl -n tenant-root delete tenant user

Expected behaviour
Tenant is cleanly deleted.

Actual behaviour
Helm hook (a Job) times out, tenant is never deleted.

Additional context
If the tenant is edited to remove the quota for loadbalancers, it is successfully removed.

Activity

  1. coderabbitai commented on Dec 23, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Possible Duplicates

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  2. changed the title [-]co[/-] [+]Tenant with loadbalancer quota cannot be deleted[/+] on Dec 23, 2025
  3. deleted a comment from dosubot on Dec 24, 2025
  4. lllamnyp commented on Dec 24, 2025

    @lllamnyp
    MemberAuthor

    Issue is apparently unrelated to loadbalancer quotas, rather has to do with quotas in general. Not enough resources to create the cleanup job. Possible solution: move the cleanup helm hook to start in a system namespace without resourcequotas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions