postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Expose additional sidecar configuration on cluster level

Open MorpheusXAUT opened this issue 2 years ago • 2 comments

  • 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 avatar Jun 22 '22 13:06 MorpheusXAUT

@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 avatar Sep 14 '22 06:09 dmvolod

@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 avatar Sep 14 '22 06:09 MorpheusXAUT

@MorpheusXAUT HAve you a PR for this issue or anny feedback?

sebglon avatar Feb 01 '23 15:02 sebglon

@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 😕

MorpheusXAUT avatar Feb 01 '23 15:02 MorpheusXAUT

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.

snarlysodboxer avatar Sep 09 '23 18:09 snarlysodboxer

I'm facing the same issue. In additions I can't define readinessProbe or securityContext for sidecars defined in the postgresql object.

MohamedMSaeed avatar Sep 10 '23 15:09 MohamedMSaeed

Same issue, was trying to add per cluster args:.

hau21um avatar Dec 05 '23 12:12 hau21um