Backup task used wrong sa ?!

I tried running a daily backup set up with an Operator

backup:
  enabled: true
  storages:
    minio:
      type: s3
      s3:
        bucket: psmdb-dev
        region: us-east-1
        credentialsSecret: XXXXXX-backup-s3
        endpointUrl: http://s3.XXXXXX.XXX/
        prefix: ""
  tasks:
  - name: daily-s3-us-east
    enabled: true
    schedule: "0 0 * * *"
    keep: 3
    storageName: minio
    compressionType: gzip

Operator take it and create a cronJob + Job, but it’s not running, and in job events I get a warning -

Warning  FailedCreate  3m50s (x134 over 12h)  job-controller  Error creating: pods "XXXX-backup-daily-s3-us-east-27391620-" is forbidden: error looking up service account psmdb/percona-server-mongodb-operator: serviceaccount "percona-server-mongodb-operator" not found

and indeed, only following service accounts are there:

NAME             SECRETS   AGE
default          1         7d22h
psmdb-operator   1         7d21h

Is it a bug, or some misconfiguration ?
Thanks!

1 Like

I found how can I change it…

backup:
  serviceAccountName: psmdb-operator
...
3 Likes