Add more volume file operations and cleanup k8s provider code
This commit is contained in:
parent
29d6abddb5
commit
f1c9965edf
3 changed files with 49 additions and 25 deletions
|
@ -59,6 +59,17 @@ class FileConfigProvider(BaseProvider):
|
|||
|
||||
return filepath
|
||||
|
||||
def remove_volume_file(self, filename):
|
||||
filepath = os.path.join(self.config_volume, filename)
|
||||
os.remove(filepath)
|
||||
|
||||
def list_volume_directory(self, path):
|
||||
dirpath = os.path.join(self.config_volume, path)
|
||||
if not os.path.exists(dirpath):
|
||||
return None
|
||||
|
||||
return os.listdir(dirpath)
|
||||
|
||||
def save_volume_file(self, filename, flask_file):
|
||||
filepath = os.path.join(self.config_volume, filename)
|
||||
try:
|
||||
|
|
Reference in a new issue