Compare commits

..

1 Commits

Author SHA1 Message Date
Morten Olsen
aa0abfb443 Added storage provisioner 2025-08-11 12:00:00 +02:00
2 changed files with 3 additions and 5 deletions

View File

@@ -79,4 +79,4 @@ const customResourceService = services.get(CustomResourceService);
customResourceService.register(...customResources);
await customResourceService.install(true);
// await customResourceService.watch();
await customResourceService.watch();

View File

@@ -35,8 +35,7 @@ class StorageProvider {
if (pvc.metadata?.annotations?.['volume.kubernetes.io/storage-provisioner'] !== PROVISIONER) {
return;
}
const target = `./data/${pvc.namespace}/${pvc.name}`;
console.log('TARGET: ', target);
const target = `/data/volumes/${pvc.namespace}/${pvc.name}`;
try {
await mkdir(target, { recursive: true });
} catch (err) {
@@ -46,8 +45,7 @@ class StorageProvider {
const pv = resourceService.get<V1PersistentVolume>({
apiVersion: 'v1',
kind: 'PersistentVolume',
name: pvc.name,
namespace: pvc.namespace,
name: `${pvc.namespace}-${pvc.name}`,
});
await pv.load();
await pv.patch({