Skip to content

Trident Operator CRD Error for autogrow #1151

@rbasore

Description

@rbasore

Describe the bug

The TridentVolumePublication CRD deployed by the Trident 26.02.1 Helm chart (chart version 100.2602.1) is missing three fields required by the autogrow feature: storageClass, autogrowPolicy, and autogrowIneligible. The CRD only defines accessMode, nodeID, readOnly, and volumeID.

As a result, when the autogrow node scheduler calls reconcileVolumeEffectivePolicy, it reads scName:"" and scAnnotation:"" from every TVP and cannot resolve which TridentAutogrowPolicy applies. All volumes are removed from the autogrow cache with "no effective policy" and autogrow never triggers — even when volumes exceed the configured usedThreshold.

The controller code clearly expects these fields (it attempts to write autogrowIneligible to TVPs, producing Warning: unknown field "autogrowIneligible"), confirming the CRD schema is out of sync with the application code.

Environment

  • Trident version: 26.02.1
  • Trident installation method: Helm chart trident-operator-100.2602.1 via SpectroCloud Palette
  • Container runtime: containerd v2.1.4
  • Kubernetes version: v1.35.2 (RKE2)
  • Kubernetes orchestrator: SpectroCloud Palette Edge (RKE2-based)
  • OS: Ubuntu 24.04 LTS, kernel 6.8.0-101-generic
  • NetApp backend: ONTAP AFF (ontap-san driver, iSCSI), ONTAP 9.x
  • Cluster: 6 nodes (3 CP, 3 worker)

To Reproduce

  1. Deploy Trident 26.02.1 via Helm chart trident-operator-100.2602.1
  2. Create a TridentBackendConfig with spaceReserve: "none" (thin provisioning)
  3. Create a TridentAutogrowPolicy (e.g., default with 80% threshold)
  4. Annotate StorageClass with trident.netapp.io/autogrowPolicy: default
  5. Create a PVC using that StorageClass and fill it above the threshold
  6. Observe autogrow node DaemonSet logs:
    scheduler.reconcileVolumeEffectivePolicy scAnnotation="" scName="" tvpAutogrowPolicy=""
    Removed volume (tvp) from cache (no effective policy)
  7. Volume never expands

Expected behavior

The TVP CRD should include storageClass, autogrowPolicy, and autogrowIneligible fields so the autogrow scheduler can resolve the effective policy and trigger ControllerExpandVolume when usage exceeds the threshold.

Workaround

Manually patch the CRD to add the missing fields:

kubectl patch crd tridentvolumepublications.trident.netapp.io --type=json -p '[
{"op":"add","path":"/spec/versions/0/schema/openAPIV3Schema/properties/storageClass","value":{"type":"string"}},
{"op":"add","path":"/spec/versions/0/schema/openAPIV3Schema/properties/autogrowPolicy","value":{"type":"string"}},
{"op":"add","path":"/spec/versions/0/schema/openAPIV3Schema/properties/autogrowIneligible","value":{"type":"boolean"}}
]'

After patching, restart the controller and node DaemonSet. Autogrow then works correctly — verified end-to-end with a 1Gi PVC expanding to 1.2Gi automatically.

Additional context

  • The TridentVolume CRD uses x-kubernetes-preserve-unknown-fields: true (schemaless), so it doesn't have this problem
  • The TVP CRD does NOT use x-kubernetes-preserve-unknown-fields — it has a strict schema with only 4 fields
  • The controller logs Warning: unknown field "autogrowIneligible" when trying to update TVPs, confirming the schema mismatch
  • Existing volumes provisioned with spaceReserve: volume (thick) are correctly marked autogrowIneligible: true once the CRD is patched — this is expected behavior
  • New thin-provisioned volumes work perfectly after the CRD fix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions