Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logical-backup: a way to access gcs bucket using gke workload identity #2836

Open
ggramal opened this issue Jan 8, 2025 · 0 comments · May be fixed by #2837
Open

logical-backup: a way to access gcs bucket using gke workload identity #2836

ggramal opened this issue Jan 8, 2025 · 0 comments · May be fixed by #2837

Comments

@ggramal
Copy link

ggramal commented Jan 8, 2025

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.14.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? GKE
  • Are you running Postgres Operator in production? yes
  • Type of issue? feature request

Gke has a feature called workload identity that is the recommended way that workloads running on GKE can access Google Cloud services in a secure and manageable way. Basically it connects k8s service accounts with gcp service accounts through the Metadata server (169.254.169.254:80). Metadata server is a well know address used by all SDKs for authentication (including gsutil).

Benefits:

  • no need to maintain (store/rotate) service account keys
  • enhanced security because metadata tokens have ttl

Possible solution:

  • update dump.sh script so that it checks if LOGICAL_BACKUP_GOOGLE_APPLICATION_CREDENTIALS env var is set
  • use -o GoogleCompute:service_account=default gsutil option

Probably can make a PR for this

@ggramal ggramal changed the title logical-backup: a way to access bucket using gke workload identity logical-backup: a way to access gcs bucket using gke workload identity Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant