zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.22k stars 968 forks source link

Support health probes for sidecar containers in cluster manifest #1142

Open AdrianoKF opened 3 years ago

AdrianoKF commented 3 years ago

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

For certain types of sidecar containers, it would be nice to be able to define health probes (liveness, readiness, startup). Unfortunately, the Sidecar struct in the cluster manifest doesn't allow probe definitions, which could be easily added (or could the Sidecar struct be replaced entirely in favor of a full v1.Container spec?)

Would this be an interesting feature addition, or am I missing a general problem as to why sidecars are limited to a certain subset of the v1.Container attributes?

I don't have any first-hand experience in operator development but can prepare an initial PR if you are interested!

FxKu commented 3 years ago

Ah another full spec request :smiley: We aim for keeping the Postgres manifest simple to use and have been reluctant to allow full spec fields, although they would give you full flexibility. But with that we also see a potential source for misuse and errors. Nevertheless, it's possible to define global sidecars in the configuration which follow the v1.Container spec. Would this also work for you?