mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-07-06 03:39:42 +00:00
fixup! fixup! fixup! fixup! Ensure that jobs run with the controller service account if no service account is specified.
This commit is contained in:
@@ -3,11 +3,13 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
from botocore.exceptions import ClientError
|
from botocore.exceptions import ClientError
|
||||||
|
from tenacity import retry, stop_after_attempt, wait_fixed
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
from s3_utils import get_s3_client, parse_s3_path, add_common_arguments, validate_args
|
from s3_utils import get_s3_client, parse_s3_path, add_common_arguments, validate_args
|
||||||
|
|
||||||
|
@retry(stop=stop_after_attempt(5), wait=wait_fixed(5))
|
||||||
def remove_directory(destination, use_role=False, role_name=None, aws_access_key_id=None, aws_secret_access_key=None, endpoint_url=None, region=None):
|
def remove_directory(destination, use_role=False, role_name=None, aws_access_key_id=None, aws_secret_access_key=None, endpoint_url=None, region=None):
|
||||||
"""
|
"""
|
||||||
Remove a directory recursively, either local or in an S3 bucket
|
Remove a directory recursively, either local or in an S3 bucket
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
from botocore.exceptions import ClientError
|
from botocore.exceptions import ClientError
|
||||||
|
from tenacity import retry, stop_after_attempt, wait_fixed
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
from s3_utils import get_s3_client, parse_s3_path, add_common_arguments, validate_args
|
from s3_utils import get_s3_client, parse_s3_path, add_common_arguments, validate_args
|
||||||
|
|
||||||
|
@retry(stop=stop_after_attempt(5), wait=wait_fixed(5))
|
||||||
def transfer_file(source, destination, use_role=False, role_name=None, aws_access_key_id=None, aws_secret_access_key=None, endpoint_url=None, region=None):
|
def transfer_file(source, destination, use_role=False, role_name=None, aws_access_key_id=None, aws_secret_access_key=None, endpoint_url=None, region=None):
|
||||||
"""
|
"""
|
||||||
Transfer a file from a local source to either a local destination or an S3 bucket
|
Transfer a file from a local source to either a local destination or an S3 bucket
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
boto3
|
boto3
|
||||||
botocore
|
botocore
|
||||||
jmespath
|
jmespath
|
||||||
|
tenacity
|
||||||
Reference in New Issue
Block a user