mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-06-10 23:29:11 +00:00
Ensure that jobs run with the controller service account if no service account is specified.
This commit is contained in:
@@ -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{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user