-
Notifications
You must be signed in to change notification settings - Fork 635
Description
Overview
I am trying to setup cluster backups without having to directly use AWS credentials, instead utilizing IRSA and OIDC.
Not 100% sure if this is a bug but looks like it.
Environment
Please provide the following details:
- Platform: EKS
- Platform Version: 1.21
- PGO Image Tag: ubi8-5.0.5-0
- Postgres Version: 13
- Storage: gp3
Steps to Reproduce
- Create IAM role in AWS and assign a trust relationship with the cluster's OIDC provider.
- Add relevant annotations to PGO's service account
- Add following cluster resource
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
labels:
argocd.argoproj.io/instance: my-cluster
name: my-cluster
namespace: my-cluster
spec:
backups:
pgbackrest:
configuration:
- secret:
name: my-cluster-pgbackrest-secret
global:
repo1-path: /pgbackrest/my-cluster/repo1
repo1-retention-full: '14'
repo1-retention-full-type: time
repo1-s3-key-type: web-id
manual:
options:
- '--type=full'
repoName: repo1
repos:
- name: repo1
s3:
bucket: my-cluster
endpoint: s3.amazonaws.com
region: us-east-1
schedules:
full: 0 0 * * *
incremental: 0 */4 * * *
instances:
- dataVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: gp3
name: my-cluster
replicas: 3
metadata:
annotations:
eks.amazonaws.com/role-arn: 'arn:aws:iam::1234567890:role/my-cluster-role'
monitoring:
pgmonitor:
exporter:
image: ''
postgresVersion: 13
proxy:
pgBouncer:
replicas: 1
users:
- databases:
- my-db1
name: my-user1
- databases:
- my-db2
name: my-user2
- Wait for the scheduled backup or trigger a manual backup.
EXPECTED
Backup job is triggered.
ACTUAL
Job is not triggered. Seeing the following errors in the logs
Logs
time="2022-04-04T23:45:47Z" level=error msg="unable to create stanza" error="command terminated with exit code 29: ERROR: [029]: unable to find child 'AssumeRoleWithWebIdentityResult':0 in node 'ErrorResponse'\n" file="internal/controller/postgrescluster/pgbackrest.go:2578" func="postgrescluster.(*Reconciler).reconcileStanzaCreate" name=my-cluster namespace=my-cluster reconciler=pgBackRest reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster version=5.0.5-0
Additional Information
I have followed AWS troubleshooting instructions from here: https://aws.amazon.com/premiumsupport/knowledge-center/eks-troubleshoot-oidc-and-irsa/ but all looks correct.
Thanks