Skip to content

fix: consolidate storage class settings and fix env var name mismatch - #581

Open
ulbi wants to merge 3 commits into
jonwiggins:mainfrom
ulbi:fix/storage-class-consolidation
Open

fix: consolidate storage class settings and fix env var name mismatch#581
ulbi wants to merge 3 commits into
jonwiggins:mainfrom
ulbi:fix/storage-class-consolidation

Conversation

@ulbi

@ulbi ulbi commented Aug 21, 2026

Copy link
Copy Markdown

Summary of Changes

  1. Bug Fix: Fixed a crucial env var name mismatch in where Helm configured and but read and respectively. This caused the dynamic Home PVC configurations to always fall back to cluster defaults.
  2. Consolidation: Reduced 4 separate storage class settings down to 2 unified keys under a global mapping in :
    • / : Used consistently for repo pod home PVCs and the static installed-skills cache PVC.
    • : Used consistently for shared-directory cache PVCs.
  3. Backward Compatibility: Fully preserved existing keys (, , , ) as fallbacks.
  4. Deprecation Logging: Added warnings in the API log when any of the deprecated environment variables are consumed.

Tests

  • Storage class settings are mainly declarative within templates; verified template outputs using and ==> Linting .
    Error unable to check Chart.yaml file in chart: stat Chart.yaml: no such file or directory.

ulbi added 3 commits August 21, 2026 19:27
BUG FIX: The env var name in secrets.yaml was OPTIO_AGENT_PVC_STORAGE_CLASS but
repo-pool-service.ts reads OPTIO_HOME_PVC_STORAGE_CLASS - they never matched,
so home PVC storage class/size always fell back to cluster default.

CONSOLIDATION: Reduced 4 separate storage class settings in Helm values to 2
unified keys under storageClass:
- storageClass.home / storageClass.homeSize: for repo pod home PVCs + installed-skills cache
- storageClass.cache: for shared directory cache PVCs

BACKWARD COMPATIBILITY: All deprecated keys (agent.pvc.storageClass,
agent.pvc.size, agent.cache.storageClass, installedSkillsCache.storageClass)
still work as fallbacks. API logs deprecation warnings when old env vars are used.

FILES CHANGED:
- helm/optio/values.yaml: Added storageClass.home, storageClass.homeSize, storageClass.cache
- helm/optio/templates/secrets.yaml: Fixed env var names + backward compat fallbacks
- helm/optio/templates/agent-pvc.yaml: ConfigMap uses unified keys with fallbacks
- helm/optio/templates/installed-skills-pvc.yaml: Uses storageClass.home with fallback
- apps/api/src/services/repo-pool-service.ts: Deprecation warnings + fallback reads
This ensures old env var keys (OPTIO_AGENT_PVC_*) are removed from the
secret when helm upgrade runs, instead of accumulating stale keys.
The helm.sh/hook on the Secret itself caused it to not be rendered in the
release manifest, resulting in missing optio-config secret after upgrade.

Solution:
- Secret is now a normal resource (no hook annotations)
- New pre-upgrade Job (secret-cleanup-hook.yaml) deletes stale secret
  before upgrade and cleans itself up after success.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant