zalando / zalando/postgres-operator

Feature: allow setting of security context for sidecar containers ( and more)

Open
#2,800 0 comments 3 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

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

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

We use the zalando postgres operator in production with Kyverno. we want to use as little excludes as possible. for the normal containers you can set the security-context trough the values.yaml of the helm chart.
We are currently using a sidecar with an custom image for monitoring of the patroni and wal-g backup state. this image does not need any special privileges.

Not all settings for a sidecar are transferred into the statefulset ( such as setting a command, security-context or envFrom).

we would like to be able to set all these settings. we can work around the EnvFrom by specifying exactly which env variables to copy from a secret.( ugly but it works). for the command we had to bake it into the image we are using.

i see there already is a PR and issue for allowing a command. but there is not any action
https://github.com/zalando/postgres-operator/issues/2448
https://github.com/zalando/postgres-operator/pull/2449

we would like to request to allow setting these settings for a sidecar. preferably in the postgresql resource to allow different images and settings per postgres cluster. (we have multiple in one kubernetes cluster)

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 by tracing how the sidecar configuration from the PostgreSQL resource is transferred into the StatefulSet, and compare it with the existing Helm chart values.yaml settings. Review issue 2448 and pull request 2449 for prior work on sidecar commands. Done should allow per-cluster sidecar command, security context, and envFrom settings without requiring image changes or broad Kyverno exclusions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.