From 614cecc68604ad2dfd76357ab2c900eb5604264b Mon Sep 17 00:00:00 2001 From: marekliszka Date: Fri, 16 Jun 2023 11:11:04 +0200 Subject: [PATCH] refatctor mount options to be injectable --- kubeluigi/volumes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kubeluigi/volumes.py b/kubeluigi/volumes.py index e7a82ed..af891b1 100644 --- a/kubeluigi/volumes.py +++ b/kubeluigi/volumes.py @@ -93,11 +93,13 @@ class AzureBlobStorageVolume(AttachableVolume): azure storage account is available on k8s. """ - def __init__(self, storage_account, storage_container): + def __init__(self, storage_account, storage_container, + mount_options="-o allow_other --file-cache-timeout-in-seconds=120"): super().__init__() self.storage_account = storage_account self.storage_container = storage_container self.mount_location = f"/mnt/{storage_account}/{self.storage_container}" + self.mount_options = mount_options def secret_name(self): """ @@ -118,7 +120,7 @@ def pod_volume_spec(self): "volumeAttributes": { "containerName": self.storage_container, "secretName": self.secret_name(), - "mountOptions": "-o allow_other --file-cache-timeout-in-seconds=120", + "mountOptions": self.mount_options, }, }, }