Proposed changes
Add optional StorageClass creation for AWS EFS volumes in environments where StorageClass creation is restricted with the ability to target a pre-existing StorageClass.
Context
Deployments fail in environments where service accounts lack permission to create cluster-scoped resources. The chart automatically creates a StorageClass for AWS EFS volumes when EFS is enabled, causing deployment errors in restricted environments.
Error example:
Error: UPGRADE FAILED: cannot patch "dg-models-aws-efs-sc" with kind StorageClass:
storageclasses.storage.k8s.io "dg-models-aws-efs-sc" is forbidden:
User "u-xxxxxxxxxx" cannot patch resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
Possible Implementation
Support both scenarios:
- Creating a new
StorageClass (default behavior)
- Using an existing
StorageClass by reference (for restricted environments)
- Add configuration flags in values.yaml
- Update
StorageClass template with conditional rendering
- Modify
PersistentVolume and PersistentVolumeClaim templates to reference configurable StorageClass name
Proposed changes
Add optional
StorageClasscreation for AWS EFS volumes in environments whereStorageClasscreation is restricted with the ability to target a pre-existingStorageClass.Context
Deployments fail in environments where service accounts lack permission to create cluster-scoped resources. The chart automatically creates a
StorageClassfor AWS EFS volumes when EFS is enabled, causing deployment errors in restricted environments.Error example:
Possible Implementation
Support both scenarios:
StorageClass(default behavior)StorageClassby reference (for restricted environments)StorageClasstemplate with conditional renderingPersistentVolumeandPersistentVolumeClaimtemplates to reference configurableStorageClassname