Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PMOD-1918] refatctor mount options to be injectable #27

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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