postgres-operator
postgres-operator copied to clipboard
Expose additional sidecar configuration on cluster level
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.8.0
- Where do you run it - cloud or metal? Kubernetes or OpenShift? [Azure AKS]
- Are you running Postgres Operator in production? [yes]
- Type of issue? [feature request]
We are using sidecar containers for log exporting/processing on a per-cluster basis and have noticed a disparity between the configuration options available on the operator level (exposing a full k8s container spec) and cluster one (exposing a custom sidecar type).
In our particular case, we would like to override the command
and args
for a sidecar container specified on cluster level, which is currently not exposed.
I'm happy to provide a PR as adding just these extra values to the custom configuration type should be relatively trivial, however wanted to check first whether that was the preferred approach or whether we should look into refactoring the cluster sidecars to support a full container spec as well.
From a previous PR introducing the global sidecar container spec I pick up a tendency to support custom types as they're less error-prone to configure for users (and also require less changes to add our desired additional settings), however I'm open to try supporting a full spec as well if that's the preferred direction.
@MorpheusXAUT it would be nice idea to add full container spec to the postgresql CR level, but seems to some migration problems will occurs in the future for running clusters (admission webhook can be implemented for migration). In this case, adding command
and args
parts would be prefer way for the custom sidecar type extensibility.
@dmvolod alright, thanks for the feedback. I'll put in a PR for the two extra command
and args
parts in a bit then, once we've finished testing it internally.
@MorpheusXAUT HAve you a PR for this issue or anny feedback?
@MorpheusXAUT HAve you a PR for this issue or anny feedback?
We started some development on this internally, but never got as far as preparing the changes for a PR, I'm afraid, sorry 😕
Came here looking to be able to customize the exact same thing, command
and args
, so we can run a public postgres-exporter image but pass custom args.
I'm facing the same issue. In additions I can't define readinessProbe
or securityContext
for sidecars defined in the postgresql
object.
Same issue, was trying to add per cluster args:
.