zalando / zalando/postgres-operator

pod_environment_secret for cronjob

Open
#2,902 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

  • Which image of the operator are you using? ghcr.io/zalando/postgres-operator:v1.11.0
  • Where do you run it - cloud or metal? Kubernetes
  • Are you running Postgres Operator in production? yes
  • Type of issue? Feature Request

We have set for our operator pod_environment_secret variable, so variables like AWS_ACCESS_KEY_ID are not hardcoded in the pod specification. The problem is that we have the logicalbackup enabled and the cronjob for that doesn't use it, but hardcodes the values of the envars. Is there any way to do that? Or does the possibility of implement that feature in the near future?

The code is here: https://github.com/zalando/postgres-operator/blob/68c4b496365f02afb57b9066492dfa319120622a/pkg/cluster/k8sres.go#L2512

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at pkg/cluster/k8sres.go around line 2512 and inspect how the logical-backup CronJob environment is built. Compare that handling with pod_environment_secret usage elsewhere in the operator. Done means the logical-backup CronJob receives the configured secret-based environment variables instead of hardcoded values.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.