Ensure that jobs run with the controller service account if no service account is specified.

This commit is contained in:
2024-12-19 18:49:59 +00:00
parent 486f8899af
commit b2e96ae07d
5 changed files with 13 additions and 9 deletions
@@ -4,7 +4,6 @@ import (
"context"
"crypto/md5"
"fmt"
"os"
"strings"
"time"
@@ -286,7 +285,7 @@ func (r *ClusterImageExportReconciler) runCleanupJob(ctx context.Context, cluste
Image: shared.BACKUP_JOB_IMAGE,
Commands: defaultCommands,
Annotations: clusterImageExport.Spec.JobAnnotations,
ServiceAccount: os.Getenv("POD_SERVICE_ACCOUNT"),
ServiceAccount: "",
ImagePullSecrets: clusterImageExport.Spec.ImagePullSecrets,
}