diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d6273e3..5a6d373 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -10,9 +10,9 @@ description: | type: application -version: 0.2.27 +version: 0.2.29 -appVersion: "0.2.27" +appVersion: "0.2.29" home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator diff --git a/chart/values.yaml b/chart/values.yaml index 3bd23ec..c913aae 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -12,7 +12,7 @@ sa: - ALL image: repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator - tag: 0.2.27 + tag: 0.2.29 resources: limits: cpu: 500m diff --git a/docker-image-worker/s3_utils.py b/docker-image-worker/s3_utils.py index 213eaae..c214d60 100644 --- a/docker-image-worker/s3_utils.py +++ b/docker-image-worker/s3_utils.py @@ -24,7 +24,10 @@ def get_s3_client(use_role=False, role_name=None, aws_access_key_id=None, aws_se client_kwargs['aws_access_key_id'] = credentials['AccessKeyId'] client_kwargs['aws_secret_access_key'] = credentials['SecretAccessKey'] client_kwargs['aws_session_token'] = credentials['SessionToken'] - return boto3.client('s3', **client_kwargs) + return boto3.client('s3', **client_kwargs) + else: + # Use the current role/credentials from the environment + return boto3.client('s3', **client_kwargs) elif aws_access_key_id and aws_secret_access_key: client_kwargs['aws_access_key_id'] = aws_access_key_id client_kwargs['aws_secret_access_key'] = aws_secret_access_key @@ -57,8 +60,8 @@ def validate_args(args, parser): Validate command-line arguments """ if args.destination.startswith('s3://'): - if args.use_role and (args.aws_access_key_id or args.aws_secret_access_key or args.endpoint_url): - parser.error("When using IAM role (--use_role), access key, secret, and endpoint URL should not be specified.") + if args.use_role and (args.aws_access_key_id or args.aws_secret_access_key): + parser.error("When using IAM role (--use_role), access key and secret should not be specified.") if (args.aws_access_key_id or args.aws_secret_access_key) and not (args.aws_access_key_id and args.aws_secret_access_key): parser.error("Both --aws_access_key_id and --aws_secret_access_key must be provided when using access key authentication.") @@ -67,4 +70,4 @@ def validate_args(args, parser): parser.error("Either --use_role or both --aws_access_key_id and --aws_secret_access_key must be provided for S3 operations.") if args.use_role and args.role_name and (args.aws_access_key_id or args.aws_secret_access_key): - parser.error("When using a specific role (--role_name), access key and secret should not be specified.") \ No newline at end of file + parser.error("When using a specific role (--role_name), access key and secret should not be specified.")