Skip to content

helm install --create-namespace fails with Capsule tenant even with cluster-admin clusterRole #1895

Description

@maybeclever

Bug description

Running helm install --create-namespace as a Capsule tenant owner fails with a 403 Forbidden on namespace-scoped resources, even though the tenant owner has cluster-admin as their clusterRole.

Creating the namespace with kubectl works fine.

How to reproduce

Steps to reproduce the behavior:

  1. Provide the Capsule Tenant YAML definitions
    `apiVersion: capsule.clastix.io/v1beta2
    kind: Tenant
    metadata:
    name: my-tenant
    spec:
    owners:
  • kind: Group
    name: my-tenant
    clusterRoles:
    • cluster-admin
    • capsule-namespace-deleter
      forceTenantPrefix: true`
  1. Run as a tenant owner
    helm upgrade --install my-release ./my-chart \ --namespace my-tenant-test \ --create-namespace

Expected behavior

Helm creates the namespace and installs the chart successfully.

Logs

Error: Unable to continue with install: could not get information about the resource ServiceAccount "my-release-sa" in namespace "my-tenant-test": serviceaccounts "my-release-sa" is forbidden: User "..." cannot get resource "serviceaccounts" in API group "" in the namespace "my-tenant-test"

If applicable, please provide logs of capsule.

In a standard stand-alone installation of Capsule,
you'd get this by running kubectl -n capsule-system logs deploy/capsule-controller-manager.

Additional context

  • Capsule version: 0.12.4
  • Helm version: v3.19.0
  • Kubernetes version: EKS 1.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-needs-validationIssue need triage and validationbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions