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
@@ -3,7 +3,6 @@ package raczylocom
import (
"context"
"fmt"
"os"
"strings"
"time"
@@ -259,7 +258,7 @@ func (r *ClusterImageReconciler) createBackupJob(ctx context.Context, clusterIma
Image: shared.BACKUP_JOB_IMAGE,
Annotations: clusterImage.Spec.JobAnnotations,
Commands: defaultCommands,
ServiceAccount: os.Getenv("POD_SERVICE_ACCOUNT"),
ServiceAccount: "",
ImagePullSecrets: clusterImage.Spec.ImagePullSecrets,
OwnerReferences: []metav1.OwnerReference{
{