Skip to content

[kubernetes] Auto-propagate infrastructure StorageClasses to tenant clusters #2094

Description

@mattia-eleuteri

Feature request

Problem

Currently, a tenant Kubernetes cluster only exposes a single hardcoded StorageClass named kubevirt, mapped to the replicated infra StorageClass. Users who have multiple StorageClasses on their infrastructure (e.g., replicated, local-ssd, hdd-archive) cannot access them from within tenant clusters.

Related: #1424

Proposed solution

Use Helm lookup in the management cluster templates to automatically discover all infrastructure StorageClasses and propagate them to tenant clusters via the kubevirt-csi-node chart.

Key changes:

  • Auto-discovery: The helmreleases/csi.yaml template uses lookup "storage.k8s.io/v1" "StorageClass" to enumerate all infra StorageClasses at reconciliation time
  • Same-name mapping: Each infra StorageClass is created in the tenant with the same name (e.g., replicated stays replicated)
  • Default propagation: The storageclass.kubernetes.io/is-default-class annotation is preserved
  • Security enforcement: An infraStorageClassEnforcement allowList is auto-generated in the driver-config ConfigMap, restricting tenants to only use propagated StorageClasses
  • Fallback: When lookup returns empty (e.g., helm template dry-run), defaults to a single replicated StorageClass
  • No Go changes: The kubevirt-csi-driver already supports multiple StorageClasses natively via infraStorageClassName

Breaking changes

The storageClass parameter is removed from the kubernetes chart's values.yaml. Existing deployments that relied on overriding this value will need to be aware that all infra StorageClasses are now auto-propagated. The old single kubevirt StorageClass is replaced by per-infra-class entries.

Affected components

  • packages/apps/kubernetes (chart values, HelmRelease template, new ConfigMap)
  • packages/system/kubevirt-csi-node (values format, StorageClass loop, enforcement ConfigMap)

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    on Feb 24, 2026
  2. github-actions commented on May 2, 2026

    @github-actions

    This issue has had no activity for 60 days and was marked lifecycle/stale.
    It will be closed in 14 days unless commented or labelled lifecycle/frozen.

  3. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    on May 2, 2026
  4. myasnikovdaniil commented on Aug 14, 2026

    @myasnikovdaniil
    Contributor

    Done in #2872 (merged 2026-06-26), remote-accessible linstor StorageClasses are propagated into tenant clusters. Closing.

    One boundary in case it was the actual ask: #2872 covers remote-capable linstor classes only, not an arbitrary infrastructure StorageClass. Reopen if you meant the wider case.

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

Metadata

Metadata

Labels

kind/featureCategorizes issue or PR as related to a new featurelifecycle/staleDenotes an issue or PR has remained open with no activity and has become staletriage/acceptedIndicates an issue is ready to be actively worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions