trident icon indicating copy to clipboard operation
trident copied to clipboard

Feature Request: Support tagging ONTAP volumes using Kubernetes PVC labels

Open ecthelion77 opened this issue 6 months ago • 0 comments

Description
ONTAP supports tagging volumes with metadata, which is useful for classification, automation, and reporting. However, Trident currently does not leverage this capability when provisioning volumes.

Image

In Kubernetes, PVCs often include meaningful labels that describe the workload, environment, owner, or other metadata. These labels are not currently propagated to the ONTAP backend, which results in a loss of valuable context at the storage layer.

Proposed Feature
Trident should support copying Kubernetes PVC labels into ONTAP volume tags during volume provisioning. Ideally, this could be implemented in two stages:

  1. Basic support: Automatically copy all PVC labels as tags on the ONTAP volume.
  2. Advanced templating: Allow administrators to define a tag template in the backend configuration, similar to how volume names can be templated. This would enable selective and dynamic tagging based on specific labels or naming conventions.

Benefits

  • Improves visibility and traceability of volumes in ONTAP
  • Enables better integration with automation and reporting tools
  • Aligns storage metadata with Kubernetes context
  • Reduces manual tagging effort and risk of inconsistency

Environment

  • Trident version: 25.02.1
  • Kubernetes version: 1.32
  • ONTAP version: 9.16.1P4

Additional Context
This feature would be particularly useful in environments with multi-tenant clusters, CI/CD pipelines, or strict governance requirements. Let me know if a more detailed use case or configuration example would help.

ecthelion77 avatar Jun 20 '25 09:06 ecthelion77