Skip to content

fix(k8s): share one PVC across multi-role ExApp Deployments#97

Merged
oleksandr-nc merged 1 commit intomainfrom
fix/k8s-shared-pvc-multirole
Apr 14, 2026
Merged

fix(k8s): share one PVC across multi-role ExApp Deployments#97
oleksandr-nc merged 1 commit intomainfrom
fix/k8s-shared-pvc-multirole

Conversation

@oleksandr-nc
Copy link
Copy Markdown
Contributor

When a K8s ExApp declares multiple <k8s-service-roles>, HaRP was creating a separate PVC per role (nc-app-{name}-{role}-data) and mounting each at a role-suffixed path. But AppAPI sets APP_PERSISTENT_STORAGE=/nc_app_{appId}_data - no role suffix, so the ExApp would write to a path that didn't match the PVC mountpoint.

This makes the PVC role-agnostic by dropping role_suffix from exapp_container_volume. All roles of one ExApp now share a single PVC mounted at the same path as APP_PERSISTENT_STORAGE. Deployment names stay per-role so each role still gets its own Deployment/pod/selector. PVC labels also switched to role-agnostic ones (part-of, name, component=exapp-data) since the PVC is no longer tied to a specific role.

Note: if anyone had a multi-role ExApp deployed with the pre-patch build, the old per-role PVCs will orphan after this goes in. They're empty (that's literally the bug), so there's no data to lose — just kubectl delete pvc the old names if you care about cleanup.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc oleksandr-nc requested a review from kyteinsky as a code owner April 14, 2026 10:48
Copy link
Copy Markdown
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@oleksandr-nc oleksandr-nc merged commit 21b30a1 into main Apr 14, 2026
3 checks passed
@oleksandr-nc oleksandr-nc deleted the fix/k8s-shared-pvc-multirole branch April 14, 2026 11:10
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.

2 participants