Skip to content

Commit

Permalink
Merge pull request #27 from optimizely/expose-blob-mountoptions
Browse files Browse the repository at this point in the history
refatctor mount options to be injectable
  • Loading branch information
marekliszka authored Jun 16, 2023
2 parents a767403 + 614cecc commit 72b686c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kubeluigi/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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,
},
},
}
Expand Down

0 comments on commit 72b686c

Please sign in to comment.