mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-06-09 23:19:15 +00:00
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! General improvements
This commit is contained in:
+2
-2
@@ -10,9 +10,9 @@ description: |
|
||||
|
||||
type: application
|
||||
|
||||
version: 0.2.42
|
||||
version: 0.2.43
|
||||
|
||||
appVersion: "0.2.42"
|
||||
appVersion: "0.2.43"
|
||||
|
||||
home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ sa:
|
||||
- ALL
|
||||
image:
|
||||
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator
|
||||
tag: 0.2.42
|
||||
tag: 0.2.43
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/go-logr/logr"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -408,6 +409,21 @@ func (r *ClusterImageExportReconciler) runCleanupJob(ctx context.Context, cluste
|
||||
mergedAnnotations[k] = v
|
||||
}
|
||||
|
||||
// Set up environment variables for AWS configuration
|
||||
envVars := []corev1.EnvVar{}
|
||||
if clusterImageExport.Spec.Storage.StorageTarget == shared.STORAGE_S3 {
|
||||
if clusterImageExport.Spec.Storage.S3.Region != "" {
|
||||
envVars = append(envVars, corev1.EnvVar{
|
||||
Name: "AWS_REGION",
|
||||
Value: clusterImageExport.Spec.Storage.S3.Region,
|
||||
})
|
||||
envVars = append(envVars, corev1.EnvVar{
|
||||
Name: "AWS_DEFAULT_REGION",
|
||||
Value: clusterImageExport.Spec.Storage.S3.Region,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
jobParams := shared.JobParams{
|
||||
Name: normalisedImageName,
|
||||
Namespace: clusterImageExport.Namespace,
|
||||
@@ -418,6 +434,7 @@ func (r *ClusterImageExportReconciler) runCleanupJob(ctx context.Context, cluste
|
||||
ImagePullSecrets: clusterImageExport.Spec.ImagePullSecrets,
|
||||
BackoffLimit: &backoffLimit,
|
||||
TTLSecondsAfterFinished: &ttlSecondsAfterFinished,
|
||||
EnvVars: envVars,
|
||||
}
|
||||
|
||||
cleanupJob := shared.CreateJob(jobParams, func(raczylocomv1.ClusterImageExport) []string { return nil })
|
||||
|
||||
@@ -117,8 +117,6 @@ func SetupS3Params(s3Config raczylocomv1.ClusterImageStorageS3) []string {
|
||||
if s3Config.Endpoint != "" {
|
||||
params = append(params, fmt.Sprintf("--endpoint_url='%s'", s3Config.Endpoint))
|
||||
}
|
||||
if s3Config.Region != "" {
|
||||
params = append(params, fmt.Sprintf("--region='%s'", s3Config.Region))
|
||||
}
|
||||
// Region is now handled via environment variables
|
||||
return params
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user